/******************************************************************************
  Module: BWIN-API.TXT
          All commands for PPLB in Dynamic Link Library under Windows
  Notices: Copyright (c) 1998-2013 ARGOX
******************************************************************************/
  Contents
===============================================================================
(01)B_Bar2d_Maxi()              => Create the 2D barcode object - Maxicode.
(02)B_Bar2d_PDF417()            => Create the 2D barcode object - PDF-417.
(03)B_Bar2d_PDF417_N()          => Create the 2D barcode object - PDF-417.
(04)B_ClosePrn()                => Stop printer operation.
(05)B_CreatePrn()               => Start printer opreation.
(06)B_Del_Form()                => Delete a "form" data.
(07)B_Del_Pcx()                 => Clean the stored "graphic data" in RAM or Flash memory.
(08)B_Draw_Box()                => Create a "box" object.
(09)B_Draw_Line()               => Create an "line" object.
(10)B_Error_Reporting()         => Enable/Disable error report.
(11)B_Get_DLL_Version()         => Get or show this verison for library.
(12)B_Get_DLL_VersionA()        => Get or show this verison for library.
(13)B_Get_Graphic_ColorBMP()    => Convert the colorBMP data from PC into mono graphic(
                                   dithering pattern) and download it into printer's RAM.
(14)B_Get_Pcx()                 => Download graph data for PCX format from PC into the
                                   printer's RAM or Flash memory.
(15)B_Initial_Setting()         => Perform the initial paprameter setting (send the
                                   command code into printer directly).
(16)B_Load_Pcx()                => Acquire the graphic data which stored in the RAM or Flash memory.
(17)B_Open_ChineseFont()        => Open Chinese dot font file (16*15 and 24*24).
(18)B_Print_Form()              => Perform printing function. And acquire the form data
                                   which stored in RAM or Flash memory.
(19)B_Print_MCopy()             => Perform printing function and make multi copy.
(20)B_Print_Out()               => Perform printing function.
(21)B_Prn_Barcode()             => Create a "barcode" object and a "counter" object.
(22)B_Prn_Configuration()       => Configuration print out.
(23)B_Prn_Text()                => Create a "text" object and a "counter" object.
(24)B_Prn_Text_Chinese()        => Create a "text" object with Chinese dot font file(16*15 or 24*24).
(25)B_Prn_Text_TrueType()       => Create a "True Type Font" text object.
(26)B_Prn_Text_TrueType_W()     => Create a "True Type Font" text object with Height and Width.
(27)B_Select_Option()           => Select function - transfer type, cutter and dispenser.
(28)B_Select_Option2()          => Select function - transfer type, cutter and dispenser.
(29)B_Select_Symbol()           => Select function - symbol set.
(30)B_Select_Symbol2()          => Select function - symbol set.
(31)B_Set_Backfeed()            => Setup the "back feed" function.
(32)B_Set_BMPSave()             => Save Image File.
(33)B_Set_Darkness()            => Setup the "darkness" function (heating level).
(34)B_Set_DebugDialog()         => Enable Debug Message Dialog.
(35)B_Set_Direction()           => Setup the "print direction".
(36)B_Set_Form()                => Download a form from PC into printers RAM or Flash memory.
(37)B_Set_Labgap()              => Setup the "label length" and "gap length".
(38)B_Set_Labwidth()            => Setup the "label width".
(39)B_Set_Originpoint()         => Setup the "origin point".
(40)B_Set_Prncomport()          => Setup the "serial port".
(41)B_Set_Prncomport_PC()       => Setup the serial port for PC.
(42)B_Set_Speed()               => Setup the "print speed".
(43)B_Set_ProcessDlg()          => Enable or disable printing task transmission process bar.
(44)B_GetUSBBufferLen()         => Get USB port data length
(45)B_EnumUSB()                 => Enum USB port
(46)B_CreateUSBPort()           => Open USB port
(47)B_ResetPrinter()            => Reset Printer
(48)B_GetPrinterResponse()      => Get Printer Error Code
(49)B_TFeedMode()               => Set Printer to T-Feed Mode
(50)B_TFeedTest()               => Paper/Ribbin Test in T-Feed Mode
(51)B_CreatePort()              => Open port
(52)B_Execute_Form()            => Execute a form stored in printer.
(53)B_Bar2d_QR()                => Create the 2D barcode object - QR code.
(54)B_GetNetPrinterBufferLen()  => Get Net ptinter data length
(55)B_EnumNetPrinter()          => Enum Net ptinter
(56)B_CreateNetPort()           => Open Net port 
(57)B_Prn_Text_TrueType_Uni()   => Create a "True Type Font" text object converted from Unicode string. 
(58)B_Prn_Text_TrueType_UniB()  => Create a "True Type Font" text object converted from Unicode string.     
(59)B_GetUSBDeviceInfo()        => Get USB port that device name and device path.
(60)B_Get_Graphic_ColorBMPEx()  => Convert the colorBMP data from PC into mono graphic(
                                   dithering pattern) and download it into printer's RAM.
(61)B_Get_Graphic_ColorBMP_HBitmap() => Convert the colorBMP data from PC into mono graphic(
                                        dithering pattern) and download it into printer's RAM.
(62)B_WriteData()               => Used to immediately send data out, 
                                   or is temporarily written to the buffer.
(63)B_ReadData()                => Get data from the printer.
(64)B_Set_EncryptionKey()       => Set the encryption key.
(65)B_Check_EncryptionKey()     => Check the encryption key correctness.
(66)B_Set_ErrorDlg()            => Enable or disable retry inquiry dialog when transmitting fail.
(67)B_Bar2d_DataMatrix()        => Create the 2D barcode object - Data Matrix code.
(68)B_Set_Backfeed_Offset()     => Set back feed offset(only for tear mode).
(69)B_Set_CutPeel_Offset()      => Set cut or peel offset(only for cut/peel mode).
(70)B_Set_CommTimeout()         => Set communication time.
(71)B_Get_CommTimeout()         => Get communication time.
(72)B_Set_LabelForSmartPrint()  => Set the information needed for Smart Print.

*******************************************************************************
  Attention
===============================================================================
1.Where should you put DLL file?
  If used 32-bit DLL files:
  A.Put DLL files in the same folder with application. (Strongly recommend.)
  B.In Windows 32-bit OS, you should put your DLL files into the \Windows\system32 directory.
  C.In Windows 64-bit OS, you should put your DLL files into the \Windows\SysWOW64 directory.
  If used 64-bit DLL files:
  A.Put DLL files in the same folder with application. (Strongly recommend.)
  B.In Windows 32-bit OS, 64-bit DLL files could not be used.
  C.In Windows 64-bit OS, you should put your DLL files into the \Windows\system32 directory.
2.Examples given below are for Visual C++ and Visual Basic and may not work 
  with other programming languages or environments.

*******************************************************************************
B_GetUSBBufferLen()
B_EnumUSB()
===============================================================================
PURPOSE   To get the device name and length of USB printer.

SYNTAX
  VC:
    int B_GetUSBBufferLen();
    int B_EnumUSB(char *buf);
  VB: VBA:
    Declare Function B_GetUSBBufferLen() As Long
    Declare Function B_EnumUSB(ByVal buf As String) As Long
  VB:
    Declare Function B_GetUSBBufferLen() As Integer
    Declare Function B_EnumUSB(ByVal buf As Byte()) As Integer

PARAMETER
    buf:
      Stores USB Printer data.

RETURN
    B_GetUSBBufferLen();  returns the length of USB Printer data.
    B_EnumUSB();  0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    char *pbuf;
    int nLen = B_GetUSBBufferLen() + 1;
    if (nLen > 1) {
      pbuf = (char *)new char[nLen];
      B_EnumUSB(pbuf);
    }
  VB: VBA:
    Dim nLen As Long
    Dim pbuf As String
    nLen = B_GetUSBBufferLen() + 1
    If nLen > 1 Then
      pbuf = Space(128)
      Call B_EnumUSB(pbuf)
    End If
  VB.net:
    Dim nLen As Integer
    Dim pbuf(128) As Byte
    nLen = B_GetUSBBufferLen() + 1
    If nLen > 1 Then
      Call B_EnumUSB(pbuf)
    End If

REMARK  These two functions are designed to be used together. First, use 
    B_GetUSBBufferLen() to retrieve the data length of the USB port. Then, 
    allocate memory to B_EnumUSB() to store the USB port data. The data from 
    USB port is split by ("0x0d0x0a"). For example, if the data is 
    A-200(0x0d)(0x0a)R-400ZIP, then USB1 is connected to A-200 and USB2 is 
    connected to R-400Zip.

*******************************************************************************
B_GetUSBDeviceInfo()
===============================================================================
PURPOSE   To retrieve the device name and device path of USB Printer.

SYNTAX
  VC:
    int B_GetUSBDeviceInfo(int nPort, char *pDeviceName, int *pDeviceNameLen, 
      char *pDevicePath, int *pDevicePathLen);
  VB: VBA:
    Declare Function B_GetUSBDeviceInfo(ByVal nPort As Long, _
      ByVal pDeviceName As String, ByRef pDeviceNameLen As Long, _
      ByVal pDevicePath As String, ByRef pDevicePathLen As Long) As Long
  VB.net:
    Declare Function B_GetUSBDeviceInfo(ByVal nPort As Integer, _
      ByVal pDeviceName As Byte(), ByRef pDeviceNameLen As Integer, _
      ByVal pDevicePath As Byte(), ByRef pDevicePathLen As Integer) As Integer

PARAMETERG
    nPort;
      Specifies the USB printer from which data is to be retrieved; begins with 1.
    pDeviceName;
      Name of USB printer device; if the input is a null pointer, no data will be written.
    pDeviceNameLen;
      When calling this function it is necessary to supply the length of temporary storage 
      of pDeviceName; when used as an output parameter it returns the length of the device name.
    pDevicePath;
      Name of USB printer device; if the input is a null pointer, no data will be written.
    pDevicePathLen;
      When calling this function it is necessary to supply the length of temporary storage 
      of pDevicePath; when used as an output parameter it returns the length of the device name.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

Example
  VC:
    char buf1[128]={0}, buf2[128]={0};
    int nLen1=128, nLen2=128, nlen;
    nlen = B_GetUSBBufferLen() + 1;
    if (nlen > 1) {
      B_GetUSBDeviceInfo(1, buf1, &nLen1, buf2, &nLen2);
      B_CreatePrn(12, buf2); //or B_CreatePort(6, 0, buf2);
    }
  VB: VBA:
    Dim buf1 As String
    Dim buf2 As String
    Dim nLen1, nLen2, nlen As Long

    nlen = B_GetUSBBufferLen() + 1
    If nlen > 1 Then
      nLen1 = 128
      nLen2 = 128
      buf1 = Space(nLen1)
      buf2 = Space(nLen2)
      Call B_GetUSBDeviceInfo(1, buf1, nLen1, buf2, nLen2)
      Call B_CreatePrn(12, buf2) 'or Call B_CreatePort(6, 0, buf2)
    End If
  VB.net:
    Dim buf1() As Byte
    Dim buf2() As Byte
    Dim nLen1, nLen2, nlen As Integer
    Dim encAscII = System.Text.Encoding.ASCII

    nlen = B_GetUSBBufferLen() + 1
    If nlen > 1 Then
      nLen1 = 128
      nLen2 = 128
      ReDim buf1(nLen1)
      ReDim buf2(nLen2)
      Call B_GetUSBDeviceInfo(1, buf1, nLen1, buf2, nLen2)
      Call B_CreatePrn(12, encAscII.GetString(buf2, 0, nLen2))
      'or Call B_CreatePort(6, 0, encAscII.GetString(buf2, 0, nLen2))
    End If

REMARK  This function first calls B_GetUSBBufferLen() to obtain the data length 
    of the USB printer. Then B_GetUSBDeviceInfo() is called to retrieve relevant 
    information about the USB printer. 
    The data stored in pDevicePath is the path of the USB device and can be used 
    in B_CreatePrn() and B_CreatePort() to create the USB device.

*******************************************************************************
B_GetNetPrinterBufferLen()
B_EnumNetPrinter()
===============================================================================
PURPOSE   To retrieve the device name and length of Net Printer.

SYNTAX
  VC:
    int B_GetNetPrinterBufferLen(void);
    int B_EnumNetPrinter(char *buf);
  VB: VBA:
    Declare Function B_GetNetPrinterBufferLen() As Long
    Declare Function B_EnumNetPrinter(ByVal buf As String) As Long
  VB.net:
    Declare Function B_GetNetPrinterBufferLen() As Integer
    Declare Function B_EnumNetPrinter(ByVal buf As Byte()) As Integer

PARAMETER
    buf;
      Stores USB Printer data.

RETURN
    B_GetNetPrinterBufferLen();  returns the length of USB data.
    B_EnumNetPrinter();  0 -> OK.
    Reference BW-Error.txt file.

Example
  VC:
    char *pbuf;
    int nLen = B_GetNetPrinterBufferLen() + 1;
    if (nLen > 1) {
      pbuf = (char *)new char[nLen];
      B_EnumNetPrinter(pbuf);
    }
  VB: VBA:
    Dim nLen As Long
    Dim pbuf As String
    nLen = B_GetNetPrinterBufferLen() + 1
    If nLen > 1 Then
      pbuf = Space(128)
      Call B_EnumNetPrinter(pbuf)
    End If
  VB.net:
    Dim nLen As Integer
    Dim pbuf(128) As Byte
    nLen = B_GetNetPrinterBufferLen() + 1
    If nLen > 1 Then
      Call B_EnumNetPrinter(pbuf)
    End If

REMARK  These two functions are designed to be used together. First, call 
    B_GetNetPrinterBufferLen() to retrieve the data length of Net Printer. Then, 
    allocate memory to B_EnumNetPrinter() to store Net Printer data. 
    The data from Net Printer is split by ("0x0d0x0a"). For example, if the data is 
    NetPrinter:192.168.1.2(0x0d)(0x0a)NetPrinter:192.168.1.25, then 
    NetPrinter1 is connected to NetPrinter:192.168.1.2 and 
    NetPrinter2 is connected to NetPrinter:192.168.1.25.

******************************************************************************
B_CreatePrn()
 ==============================================================================
PURPOSE   Start printer opreation.

SYNTAX
  VC:
    int B_CreatePrn(int selection, LPCTSTR filename);
  VB: VBA:
    Declare Function B_CreatePrn(ByVal selection As Long, _
      ByVal filename As String) As Long
  VB:
    Declare Function B_CreatePrn(ByVal selection As Integer, _
      ByVal filename As String) As Integer

PARAMETER
    selection;
      To select the printer port.
      0 -> print to file.
      1 -> lpt1, 2 -> lpt2, 3 -> lpt3
      4 -> com1, 5 -> com2, 6 -> com3
      10 -> pipe, 11 -> USBXXX, 12 -> USB
      13 -> LAN Client(TCP/IP)
    filename;
      When selection is 0, file name in current directory; full directory path.
      When selection is 10, output path or Regedit(Device path).
      When selection is 11, index of USB (count from 1).
      When selection is 12, Regedit(Device path) of USB.
      When selection is 13, IP address (TCP/IP port: 9100).
        Port can be modified by adding information to IP address.
        Ex: Set port as 80 -> 192.168.1.100:80)

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_CreatePrn(1, NULL); or B_CreatePrn(0, "C:\\out.prn");
    B_CreatePrn(10,"\\\\allen\\Label");  //share mode.
  VB: VBA: VB.net:
    Call B_CreatePrn(1, null) or Call B_CreatePrn(0, "C:\\out.prn")
    Call B_CreatePrn(10, "\\\\allen\\Label")

REMARK  The B_CreatePrn() function will activate a valid printer port or 
    "print to file" path. This function must be performed before all commands.
    B_CreatePrn(), B_CreateUSBPort() , B_CreateNetPort() and B_CreatePort() 
    must use one of it at once.

******************************************************************************
B_CreatePort()
==============================================================================
PURPOSE   Start printer opreation.

SYNTAX
  VC:
    int B_CreatePort(int nPortType, int nPort, LPCTSTR filename);
  VB: VBA:
    Declare Function B_CreatePort(ByVal nPortType As Long, ByVal nPort As Long, _
      ByVal filename As String) As Long
  VB.net:
    Declare Function B_CreatePort(ByVal nPortType As Integer, ByVal nPort As Integer, _
      ByVal filename As String) As Integer

PARAMETER
    nPortType;
      To select port type.
      0 -> file
      1 -> Serial port
      2 -> Parallel prot
      4 -> USB port
      5 -> LAN port
      6 -> USB port
    nPort;
      To select the printer port number.
      if nPortType is 1, 1 -> com1, 2 -> com2, ......
    filename;
      When nPortType is 0, path of file.
      When nPortType is 4, index of USB (count from 1).
      When nPortType is 5, IP address (TCP/IP port: 9100).
      When nPortType is 6, device path of USB.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_CreatePort(1, 1, NULL)
    B_CreatePort(0, 0, "C:\\out.prn");
    B_CreatePort(5, 0, "192.168.1.3");
  VB: VBA: VB.net:
    Call B_CreatePort(1, 1, null)
    Call B_CreatePort(0, 0, "C:\\out.prn")
    Call B_CreatePort(5, 0, "192.168.1.3")

REMARK  The B_CreatePort() function will activate a valid printer port or
    "print to file" path. This function must be performed before all commands.
    B_CreatePrn(), B_CreateUSBPort(), B_CreateNetPort() and B_CreatePort() 
    must use one of it at once.

******************************************************************************
B_CreateUSBPort()
B_CreateNetPort()
 ==============================================================================
PURPOSE   Start printer opreation.
        Before using B_CreateUSBPort(), to call B_GetUSBBufferLen() first, 
        This is for with B_EnumUSB() and B_GetUSBDeviceInfo() synchronization.
        Before using B_CreateNetPort(), to call B_GetNetPrinterBufferLen() first, 
        This is for with B_EnumNetPrinter() synchronization.

SYNTAX
  VC:
    int B_CreateUSBPort(int nPort);
    int B_CreateNetPort(int nPort);
  VB: VBA:
    Declare Function B_CreateUSBPort(ByVal nPort As Long) As Long
    Declare Function B_CreateNetPort(ByVal nPort As Long) As Long
  VB:
    Declare Function B_CreateUSBPort(ByVal nPort As Integer) As Integer
    Declare Function B_CreateNetPort(ByVal nPort As Integer) As Integer

PARAMETER
    nPort;
      USB and LAN port, the nPort count from 1.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    int nLen;
    nLen = B_GetUSBBufferLen();
    if (nLen) {
      B_CreateUSBPort(1);
    }
    nLen = B_GetNetPrinterBufferLen();
    if (nLen) {
      B_CreateNetPort(1);
    }
  VB: VBA: VB.net:
    Dim nLen As Long
    nLen = B_GetUSBBufferLen()
    If nLen Then
      Call B_CreateUSBPort(1)
    End If
    nLen = B_GetNetPrinterBufferLen()
    If nLen Then
      Call B_CreateNetPort(1)
    End If

REMARK  The B_CreateUSBPort() and B_CreateNetPort() function 
    will activate a valid printer port or "print to file" path. This 
    function must be performed before all commands.
    B_CreatePrn(), B_CreateUSBPort() , B_CreateNetPort() and B_CreatePort() 
    must use one of it at once.

******************************************************************************
B_ClosePrn()
==============================================================================
PURPOSE   Stop printer operation.

SYNTAX
  VC:
    void B_ClosePrn(void);
  VB: VBA: VB.net:
    Declare Sub B_ClosePrn()

EXAMPLE
  VC:
    B_ClosePrn();
  VB: VBA: VB.net:
    Call B_ClosePrn

REMARK  The B_ClosePrn function will access the port that you choiced or
    close file. The function must be performed after all commands placed.

*******************************************************************************
B_Bar2d_Maxi()
===============================================================================
PURPOSE   Create the 2D barcode object - Maxicode.

SYNTAX
  VC:
    int B_Bar2d_Maxi(int x, int y, int cl, int cc, int pc, LPCTSTR data);
  VB: VBA:
    Declare Function B_Bar2d_Maxi(ByVal x As Long, ByVal y As Long, ByVal cl As Long, _
      ByVal cc As Long, ByVal pc As Long, ByVal data As String) As Long
  VB.net:
    Declare Function B_Bar2d_Maxi(ByVal x As Integer, ByVal y As Integer, _
      ByVal cl As Integer, ByVal cc As Integer, ByVal pc As Integer, _
      ByVal data As String) As Integer

PARAMETER
    x;
      X coordinate in dots.
    y;
      Y coordinate in dots.
    cl;
      A 3-digit Class code.
    cc;
      A 3-digits Country code.
    pc;
      Post code, 4 or 5 digits for USA and 6 characters for other countries.
    data;
      Data string. Up to 84 characters.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Bar2d_Maxi(50, 50, 300, 400, 93065, "This MaxiCode");
  VB: VBA: VB.net:
    Call B_Bar2d_Maxi(50, 50, 300, 400, 93065, "This MaxiCode")

REMARK  The B_Bar2d_Maxi function can print a Maxi Code 2D Barcode.

******************************************************************************
B_Bar2d_PDF417()
==============================================================================
PURPOSE   Create the 2D barcode object - PDF-417.

SYNTAX
  VC:
    int B_Bar2d_PDF417(int x, int y, int w, int v, int s, int c, int px, int py, 
      int r, int l, int t, int o, LPCTSTR data);
  VB: VBA:
    Declare Function B_Bar2d_PDF417(ByVal x As Long, ByVal y As Long, ByVal w As Long, _
      ByVal v As Long, ByVal s As Long, ByVal c As Long, ByVal px As Long, _
      ByVal py As Long, ByVal r As Long, ByVal l As Long, ByVal t As Long, _
      ByVal o As Long, ByVal data As String) As Long
  VB.net:
    Declare Function B_Bar2d_PDF417(ByVal x As Integer, ByVal y As Integer, _
      ByVal w As Integer, ByVal v As Integer, ByVal s As Integer, ByVal c As Integer, _
      ByVal px As Integer, ByVal py As Integer, ByVal r As Integer, ByVal l As Integer, _
      ByVal t As Integer, ByVal o As Integer, ByVal data As String) As Integer

PARAMETER
    x;
      X coordinate in dots.
    y;
      Y coordinate in dots.(1 dot = 0.125 mm)
    w;
      Maximum print width in dots.
    v;
      Maximum print height in dots.
    s;
      Error correction level , 0 ~ 8.
    c;
      Data compression level , 0 or 1.
    px;
      Module width , 2 ~ 9 in dots.
    py;
      Module height , 4 ~ 99 in dots.
    r;
      Maximum row count.
    l;
      Maximum column count.
    t;
      Truncation flag, 0 = normal. 1 = truncated.
    o;
      Rotation. '0' is  0XA'1' is 90XB'2' is 180XA'3' is 270X
    data;
      A data string.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Bar2d_PDF417(10, 10, 400, 300, 0, 0, 3, 7, 10, 2, 0, 0, "ARGOXINFO");
  VB: VBA: VB.net:
    Call B_Bar2d_PDF417(10, 10, 400, 300, 0, 0, 3, 7, 10, 2, 0, 0, "ARGOXINFO")

REMARK  The B_Bar2d_PDF417 function can print a PDF-417 2D Barcode.

*******************************************************************************
B_Bar2d_DataMatrix()
===============================================================================
PURPOSE   Create the 2D barcode object - Data Matrix code.

SYNTAX
  VC:
    int B_Bar2d_DataMatrix(int x, int y, int r, int l, int h, int v, LPCTSTR data);
  VB: VBA:
    Declare Function B_Bar2d_DataMatrix(ByVal x As Long, ByVal y As Long, ByVal r As Long, _
      ByVal l As Long, ByVal h As Long, ByVal v As Long, ByVal data As String) As Long
  VB.net:
    Declare Function B_Bar2d_DataMatrix(ByVal x As Integer, ByVal y As Integer, _
      ByVal r As Integer, ByVal l As Integer, ByVal h As Integer, _
      ByVal v As Integer, ByVal data As String) As Integer

PARAMETER
    x;
      X coordinate in dots.
    y;
      Y coordinate in dots.
    r;
      row count(range: 9~49, must be even value; 0 is auto).
    l;
      column count(range: 9~49, must be even value; 0 is auto).
    h;
      barcode height, range: 140 dots.
    v;
      Inverse image of the bar code. 0 -> FALSEB1 -> TRUE.
    data;
      A data string.

RETURN
    0    -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Bar2d_DataMatrix(10, 10, 0, 0, 5, 0, "DataMatrix");
  VB: VBA: VB.net:
    Call B_Bar2d_DataMatrix(10, 10, 0, 0, 5, 0, "DataMatrix")

REMARK  The B_Bar2d_DataMatrix function can print a Data Matrix code.

******************************************************************************
B_Del_Form()
==============================================================================
PURPOSE   Delete a "form" data.

SYNTAX
  VC:
    int B_Del_Form(char formname[10]);
  VB: VBA:
    Declare Function B_Del_Form(ByVal formname As String) As Long
  VB.net:
    Declare Function B_Del_Form(ByVal formname As String) As Integer

PARAMETER
    formname;
      form name with a maximum of 9 characters.
      Value "*": All forms will be deleted form RAM or flash memory.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Del_Form("demo");
  VB: VBA: VB.net:
    Call B_Del_Form("demo")

REMARK  The B_Del_Form function causes the printer to delete forms currently
    stored in RAM or flash memory. Once a form is deleted.
    It can not be retrieved and printed except it is reloaded again.

******************************************************************************
B_Del_Pcx()
==============================================================================
PURPOSE   Clean the stored "graphic data" in RAM or Flash memory.

SYNTAX
  VC:
    int B_Del_Pcx(char pcxname[10]);
  VB: VBA:
    Declare Function B_Del_Pcx(ByVal pcxname As String) As Long
  VB.net:
    Declare Function B_Del_Pcx(ByVal pcxname As String) As Integer

PARAMETER
    pcxname;
      Maximum 9 characters for the graghic data name.
      The value  is "*" that clearns all graphic datas from RAM or flash memory.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Del_Pcx("*");
  VB: VBA: VB.net:
    Call B_Del_Pcx("*")

REMARK  The B_Del_Pcx function will delete the graphics data which already
    stored in printers RAM or flash memory. If certain gragics data was
    deleted, it will not be retrieved and printed unless be reloaded.

******************************************************************************
B_Draw_Box()
==============================================================================
PURPOSE   Create a "box" object.

SYNTAX
  VC:
    int B_Draw_Box(int x, int y, int thickness, int hor_dots, int ver_dots);
  VB: VBA:
    Declare Function B_Draw_Box(ByVal x As Long, ByVal y As Long, _
      ByVal thickness As Long, ByVal hor_dots As Long, ByVal ver_dots As Long) As Long
  VB.net:
    Declare Function B_Draw_Box(ByVal x As Integer, ByVal y As Integer, _
      ByVal thickness As Integer, ByVal hor_dots As Integer, _
      ByVal ver_dots As Integer) As Integer

PARAMETER
    x;
      X coordinate of star point in dots.
    y;
      Y coordinate of star point in dots.(1 dot = 0.125 mm)
    thickness;
      Thickness of four edges.
    hor_dots;
      X coordinate of end point in dots.
    ver_dots;
      Y coordinate of end point in dots.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Draw_Box(50, 120, 5, 250, 150);
  VB: VBA: VB.net:
    Call B_Draw_Box(50, 120, 5, 250, 150)

REMARK  The B_Draw_Box function will draw a box by "OR" operation.

******************************************************************************
B_Draw_Line()
==============================================================================
PURPOSE   Create an "line" object.

SYNTAX
  VC:
    int B_Draw_Line(char mode, int x, int y, int hor_dots, int ver_dots);
  VB: VBA:
    Declare Function B_Draw_Line(ByVal mode As Byte, ByVal x As Long, ByVal y As Long, _
      ByVal hor_dots As Long, ByVal ver_dots As Long) As Long
  VB.net:
    Declare Function B_Draw_Line(ByVal mode As Byte, ByVal x As Integer, _
      ByVal y As Integer, ByVal hor_dots As Integer, ByVal ver_dots As Integer) As Integer

PARAMETER
    mode;
      See as follows:
      +------+----------------------------+
      | mode | operation.                 |
      +------+----------------------------+
      |   E  | Exclusive OR               |
      +------+----------------------------+
      |   O  | OR                         |
      +------+----------------------------+
      |   W  | White line, so it may erase|
      |      | previous image.            |
      +------+----------------------------+
    x;
      X coordinate in dots.
    y;
      Y coordinate in dots.(1 dot = 0.125 mm)
    hor_dots;
      Horizontal length in dots.
    ver_dots;
      Vertical length in dots.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Draw_Line('O', 50, 30, 100, 10);
  VB: VBA: VB.net:
    Call B_Draw_Line(Asc("O"), 50, 30, 100, 10)

REMARK  The B_Draw_Line function will draw a line by "OR" or "XOR" operation.

******************************************************************************
B_Error_Reporting()
==============================================================================
PURPOSE   Enable/Disable error report.

SYNTAX
  VC:
    int B_Error_Reporting(char option);
  VB: VBA:
    Declare Function B_Error_Reporting(ByVal options As Byte) As Long
  VB.net:
    Declare Function B_Error_Reporting(ByVal options As Byte) As Integer

PARAMETER
    option;
      'N' will disable feedback of printer status.
      'S' will enable feedback of printer status.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Error_Reporting('S');
  VB: VBA: VB.net:
    Call B_Error_Reporting(Asc("S"))

REMARK  The B_Error_Reporting function is used to enable/disable the feedback
    of printer status. The feedback channel is through the RS232 port.
    The default is "disable".

******************************************************************************
B_Get_DLL_Version()
B_Get_DLL_VersionA()
  ==============================================================================
PURPOSE  Get or show this verison for library.

SYNTAX
  VC:
    char* B_Get_DLL_Version(int nShowMessage);
    int B_Get_DLL_VersionA(int nShowMessage);
  VB: VBA:
    Declare Function B_Get_DLL_Version(ByVal nShowMessage As Long) As Long
    Declare Function B_Get_DLL_VersionA(ByVal nShowMessage As Long) As Long
  VB.net:
    Declare Function B_Get_DLL_Version(ByVal nShowMessage As Integer) As String
    Declare Function B_Get_DLL_VersionA(ByVal nShowMessage As Integer) As Integer

PARAMETER
    nShowMessage;
      0 -> The message dailog isn't showed.
      1 -> The message dailog is showed.

RETURN
    B_Get_DLL_Version();  Library verison string, if fail return null.
    B_Get_DLL_VersionA();  return version value.
                           MainVersion = (return version value) / 100.
                           SubVersion = (return version value) % 100.

EXAMPLE
  VC:
    int nVersion, nMainVersion, nSubVersion;
    nVersion = B_Get_DLL_VersionA(1);
    nMainVersion = nVersion / 100;
    nSubVersion = nVersion % 100;
  VB: VBA:
    Dim nVersion, nMainVersion, nSubVersion As Long
    nVersion = B_Get_DLL_VersionA(1)
    nMainVersion = Int(nVersion / 100)
    nSubVersion = nVersion Mod 100
  VB.net:
    Dim nVersion, nMainVersion, nSubVersion As Integer
    nVersion = B_Get_DLL_VersionA(1)
    nMainVersion = nVersion / 100
    nSubVersion = nVersion Mod 100

REMARK  The B_Get_DLL_Version function is used to get or show this verison for library.
    Because the B_Get_DLL_Version() is return the string. 
    If using VB and VBA to develop, need to use RtlMoveMemory() to convert,
    there is technical difficulty to using RtlMoveMemory(). 
    If you use VB and VBA to develop propose not using this function, 
    please change to use B_Get_DLL_VersionA().
    If you must use B_Get_DLL_Version(), please reference MSDN. 

*******************************************************************************
B_Get_Graphic_ColorBMP()
B_Get_Graphic_ColorBMPEx()
B_Get_Graphic_ColorBMP_HBitmap()
===============================================================================
PURPOSE   To convert BMP image file to grayscale mode and store the graphics 
    in the printer's RAM.

SYNTAX
  VC:
    int B_Get_Graphic_ColorBMP(int x, int y, LPCTSTR filename);
    int B_Get_Graphic_ColorBMPEx(int x, int y, int nWidth, int nHeight,
      int rotate, LPCTSTR id_name, LPCTSTR filename);
    int B_Get_Graphic_ColorBMP_HBitmap(int x, int y, int nWidth, int nHeight,
      int rotate, LPCTSTR id_name, HBITMAP hbm);    
  VB: VBA:
    Declare Function B_Get_Graphic_ColorBMP(ByVal x As Long, ByVal y As Long, _
      ByVal filename As String) As Long
    Declare Function B_Get_Graphic_ColorBMPEx(ByVal x As Long, _
      ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, _
      ByVal rotate As Long, ByVal id_name As String, ByVal filename As String) As Long
    Declare Function B_Get_Graphic_ColorBMP_HBitmap(ByVal x As Long, _
      ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, _
      ByVal rotate As Long, ByVal id_name As String, ByVal hbm As Long) As Long
  VB.net:
    Declare Function B_Get_Graphic_ColorBMP(ByVal x As Integer, ByVal y As Integer, _
      ByVal filename As String) As Integer
    Declare Function B_Get_Graphic_ColorBMPEx(ByVal x As Integer, _
      ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, _
      ByVal rotate As Integer, ByVal id_name As String, ByVal filename As String) As Integer
    Declare Function B_Get_Graphic_ColorBMP_HBitmap(ByVal x As Integer, _
      ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, _
      ByVal rotate As Integer, ByVal id_name As String, ByVal hbm As Integer) As Integer

PARAMETER
    x;
      X-coordinate.
    y;
      Y-coordinate.
    nWidth;
      This parameter specifies the width of the scaled graphics; 
      0 indicates original width.
    nHeight;
      This parameter specifies the height of the scaled graphics;
      0 indicates original height.
    rotate;
      This parameter specifies the degree of rotation of the scaled graphics; 
      '0' is 0X, '1' is 90X, '2' is 180X and '3' is 270X.
    id_name;
      Provides a name to be stored in the printer for identification purposes; can be call out 
      graphic directly via the B_Load_Pcx() function.
    filename;
      Name of graphics file; may contain file path.
      The format is as follows: XXXXXXXX.XXX or X:\\XXX\\XXX.XXX
    hbm;
      GDI HBITMAP Handle, which supports only the IMAGE_BITMAP format.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Get_Graphic_ColorBMP(30, 20, "bb.bmp");
    B_Get_Graphic_ColorBMPEx(30, 20, 200, 150, 2, "bb1", "bb.bmp");//180 angle.
    HANDLE himage = LoadImage(NULL,"bb.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
    B_Get_Graphic_ColorBMP_HBitmap(30, 20, 250, 80, 1, "bb2", (HBITMAP)himage);//90 angle.      
  VB: VBA:
    Const IMAGE_BITMAP = 0
    Const LR_LOADFROMFILE = &H10
    Private Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Long, _
            ByVal lpsz As String, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, _
            ByVal un2 As Long) As Long
    Private Declare Function DeleteObject Lib "Gdi32" (ByVal ho As Long) As Long
    
    Call B_Get_Graphic_ColorBMP(30, 20, "bb.bmp")
    Call B_Get_Graphic_ColorBMPEx(30, 20, 200, 150, 2, "bb1", "bb.bmp") ' 180 angle.
    Dim himage As Long
    himage = LoadImage(0, "bb.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE)
    Call B_Get_Graphic_ColorBMP_HBitmap(30, 20, 250, 80, 1, "bb2", himage) ' 90 angle.
    If himage Then
        Call DeleteObject(himage)
    End If
  VB.net:
    Const IMAGE_BITMAP = 0
    Const LR_LOADFROMFILE = &H10
    Private Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Integer, _
            ByVal lpsz As String, ByVal un1 As Integer, ByVal n1 As Integer, ByVal n2 As Integer, _
            ByVal un2 As Integer) As Integer
  
    Call B_Get_Graphic_ColorBMP(30, 20, "bb.bmp")
    Call B_Get_Graphic_ColorBMPEx(30, 20, 200, 150, 2, "bb1", "bb.bmp") ' 180 angle.
    Dim himage As Integer
    himage = LoadImage(0, "bb.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE)
    Call B_Get_Graphic_ColorBMP_HBitmap(30, 20, 250, 80, 1, "bb2", himage) ' 90 angle. 

REMARK  You may provide a color BMP image file of any bit map to the 
    B_Get_Graphic_ColorBMP() function; it will automatically be converted to a 
    B&W grayscale image and sent to the printer for output. 
    The B_Get_Graphic_ColorBMPEx() and B_Get_Graphic_ColorBMP_HBitmap() functions 
    can be used to carry out zoom in, zoom out and rotation functions. They take 
    file names and GDI HBITMAP Handles as data sources.

******************************************************************************
B_Get_Pcx()
==============================================================================
PURPOSE   Download graph data from PC into the printer's RAM or Flash memory.

SYNTAX
  VC:
    int B_Get_Pcx(int x, int y, LPCTSTR filename);
  VB: VBA:
    Declare Function B_Get_Pcx(ByVal x As Long, ByVal y As Long, _
      ByVal filename As String) As Integer
  VB.net:
    Declare Function B_Get_Pcx(ByVal x As Integer, ByVal y As Integer, _
      ByVal filename As String) As Integer

PARAMETER
    x;
      X coordinate in dots.
    y;
      Y coordinate in dots.(1 dot = 0.125 mm)
    filename;
      File name of graphic data for PCX with path.
      The format is XXXXXXXX.XXX or X:\\XXX\\XXX.XXX

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Get_Pcx(50, 30, "phone.pcx");
  VB: VBA: VB.net:
    Call B_Get_Pcx(50, 30, "phone.pcx")

REMARK  The B_Get_PCX function will store graphic object for PCX in RAM memory.

******************************************************************************
B_Initial_Setting()
===============================================================================
PURPOSE   Perform the initial paprameter setting (send the command code into
    printer directly).

SYNTAX
  VC:
    int B_Initial_Setting(int Type, LPCTSTR Source);
  VB:
    Declare Function B_Initial_Setting(ByVal Type As Long, _
      ByVal Source As String) As Long
  VB:
    Declare Function B_Initial_Setting(ByVal Type As Integer, _
      ByVal Source As String) As Integer

PARAMETER
    Type;
      To choose type to input.
      0 -> to import a string. 1 -> to import a file.
    Source;
      The data source is string or file name in path.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    LPCTSTR aa = "ZT\r\n";
    B_Initial_Setting(0, aa);
      or
    B_Initial_Setting(1, "initfile.txt");
  VB: VBA: VB.net:
    Dim aa As String
    aa = "ZT" + Chr(13) + Chr(10)
    Call B_Initial_Setting(0, aa)
      or
    Call B_Initial_Setting(1, "initfile.txt")

REMARK  The B_Initial_Setting function is prescored to send some commands
    defined by user. The function will send a string with some commands or
    a file. The command should be placed after the B_Create_Prn() function.

*******************************************************************************
B_WriteData()
===============================================================================
PURPOSE   To output data immediately or send it to temporary area.

SYNTAX
  VC:
    int B_WriteData(int IsImmediate, LPCTSTR pbuf, DWORD length);
  VB: VBA:
    Declare Function B_WriteData(ByVal IsImmediate As Long, _
      ByVal pbuf As String, ByVal length As Long) As Long  
  VB.net:
    Declare Function B_WriteData(ByVal IsImmediate As Integer, _
      ByVal pbuf As Byte(), ByVal length As ULong) As Integer

PARAMETER
    IsImmediate;
      1 that the data should be sent immediately, and only the data in pbuf should 
      be sent to the output port; 
      0 that the data is to be stored to the temporary area and will only be sent 
      when B_Print_Out() is called.
    pbuf;
      The data pointer to be sent.
    length;
      Length of pbuf data.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    const char sznop1[] = "nop_front\r\n";
    const char sznop2[] = "nop_middle\r\n";
    B_WriteData(0, sznop2, (DWORD)strlen(sznop2));
    B_WriteData(1, sznop1, (DWORD)strlen(sznop1));
  VB: VBA:
    Dim sznop1 As String = "nop_front" + vbCrLf
    Dim sznop2 As String = "nop_middle" + vbCrLf
    Call B_WriteData(0, sznop2, Len(sznop2))
    Call B_WriteData(1, sznop1, Len(sznop1))  
  VB.net:
    Dim encAscII = System.Text.Encoding.ASCII
    Dim sznop1 As String = "nop_front" + vbCrLf
    Dim sznop2 As String = "nop_middle" + vbCrLf
    Call B_WriteData(0, encAscII.GetBytes(sznop2), sznop2.Length)
    Call B_WriteData(1, encAscII.GetBytes(sznop1), sznop1.Length)

REMARK  Any controls, commands or data that you wish to send to the printer can 
    be sent via this function.

*******************************************************************************
B_ReadData()
===============================================================================
PURPOSE   To retrieve data from the printer.

SYNTAX
  VC:
    int B_ReadData(LPTSTR pbuf, DWORD length, DWORD dwTimeoutms);
  VB: VBA:
    Declare Function B_ReadData(ByVal pbuf As String, ByVal length As Long, _
      ByVal dwTimeoutms As Long) As Long
  VB.net:
    Declare Function B_ReadData(ByVal pbuf As Byte(), ByVal length As ULong, _
      ByVal dwTimeoutms As ULong) As Integer

PARAMETER
    pbuf;
      Contains the pointer to the returned data. If it is a null pointer, 
      no data is written.
    length;
      Size of data to be read.
    dwTimeoutms;
      Time counter, i.e. maximum length of time allowed when reading data (unit: ms).

RETURN
    Size of data to be read.

EXAMPLE
  VC:
    int ret;
    char temp[10]={0};
    B_WriteData(1, "^ee\r\n", 5);//^ee
    ret = B_ReadData(temp, 4, 1000);//1 second.
  VB: VBA:
    Dim ret As Integer
    Dim temp As String
    temp = Space(10)
    temp = "^ee\r\n"
    B_WriteData(1, temp, 5)   '^ee
    ret = B_ReadData(pbuf, 4, 1000)   '1 second.
  VB.net:
    Dim ret As Integer
    Dim temp(10) As Byte
    B_WriteData(1, encAscII.GetBytes("^ee\r\n"), 5)   '^ee
    ret = B_ReadData(pbuf, 4, 1000)   '1 second.

REMARK  This function is used to read the data returned from the printer, so 
    please check to see if the communication port being used has the ability 
    to return data. Use this function in conjunction with the B_WriteData() 
    function and refer to the Argox programmer's manual for additional information.

*******************************************************************************
B_Load_Pcx()
==============================================================================
PURPOSE   Acquire the graphic data which stored in the RAM or Flash memory.

SYNTAX
  VC:
    int B_Load_Pcx(int x, int y, char pcxname[10]);
  VB: VBA:
    Declare Function B_Load_Pcx(ByVal x As Long, ByVal y As Long, _
      ByVal pcxname As String) As Long
  VB.net:
    Declare Function B_Load_Pcx(ByVal x As Integer, ByVal y As Integer, _
      ByVal pcxname As String) As Integer

PARAMETER
    x;
      X coordinate in dots.
    y;
      Y coordinate in dots.
    pcxname;
      Graph name with a maximum of 9 characters.

RETURN  0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Load_Pcx(50, 30, "phone");
  VB: VBA: VB.net:
    Call B_Load_Pcx(50, 30, "phone")

REMARK  The B_Load_Pcx function will print a graphic data which has been
    downloaded into the printer.

*******************************************************************************
B_Open_ChineseFont()
===============================================================================
PURPOSE   Open Chinese dot font file (16*15 and 24*24).

SYNTAX
  VC:
    int B_Open_ChineseFont(char* path);
  VB: VBA:
    Declare Function B_Open_ChineseFont(ByVal path As String) As Long
  VB:
    Declare Function B_Open_ChineseFont(ByVal path As String) As Integer

PARAMETER
    path;
      The Chinese dot font file source path.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Open_ChineseFont("C:\\ET3");
  VB: VBA: VB.net:
    Call B_Open_ChineseFont("C:\\ET3")

REMARK  The B_Open_ChineseFont function will open Chinese dot font file (16*15 M 24*24).
    And give B_Prn_Text_Chinese function to used.

******************************************************************************
B_Print_Form()
==============================================================================
PURPOSE   Perform printing function. And acquire the form data which stored
    in RAM or Flash memory.

SYNTAX
  VC:
    int B_Print_Form(int labset, int copies, char form_out[10], LPTSTR var);
  VB: VBA:
    Declare Function B_Print_Form(ByVal labset As Long, ByVal copies As Long, _
      ByVal form_out As String, ByVal var As String) As Long
  VB.net:
    Declare Function B_Print_Form(ByVal labset As Integer, ByVal copies As Integer, _
      ByVal form_out As String, ByVal var As String) As Integer

PARAMETER
    labset;
      Number of label sets, 1 ~ 32767.
    copies;
      Number of copies per label, 1 ~ 32767.
    form_out;
      Form name of store in printer.The name is same inter form name of printer.
    var;
      VAR,COUNT in accordance with forms. Use "," to differentiate between VAR or COUNT 
      of string. You would want to use ",". You can use ";,".This ";," is "," mean.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Print_form(3, 2, "demo", "2000,Bicycle");
  VB: VBA: VB.net:
    Call B_Print_form(3, 2, "demo", "2000,Bicycle")

REMARK  The B_Print_Form function access data of all commands in the form.
    First used B_Set_form() to store a form in printer. The command have
    to be placed after all commands. Befor B_ClosePrn(). The labset
    parameter will make increment or decrement for field values.

******************************************************************************
B_Print_MCopy()
===============================================================================
PURPOSE   Perform printing function and make multi copy.

SYNTAX
  VC:
    int B_Print_MCopy(int labset, int copies);
  VB: VBA:
    Declare Function B_Print_MCopy(ByVal labset As Long, _
      ByVal copies As Long) As Long
  VB.net:
    Declare Function B_Print_MCopy(ByVal labset As Integer, _
      ByVal copies As Integer) As Integer

PARAMETER
    labset;
      Number of label sets, 1 ~ 32767.
    copies;
      Number of copies per label, 1 ~ 32767.
      If the value is number one, it is same B_Print_Out() function.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Print_MCopy(2,2);
  VB: VBA: VB.net:
    Call B_Print_MCopy(2,2)

REMARK  The B_Print_MCopy function will send all data to the printer. The
    function has to be performed befor ClosePrn function. The Print_Out()
    function will not be activated when Print_MCopy is setup. The labset
    parameter will make increment or decrement for field values.

*******************************************************************************
B_Print_Out()
==============================================================================
PURPOSE   Perform printing function.

SYNTAX
  VC:
    int B_Print_Out(int labset);
  VB: VBA:
    Declare Function B_Print_Out(ByVal labset As Long) As Long
  VB.net:
    Declare Function B_Print_Out(ByVal labset As Integer) As Integer

PARAMETER
    labset;
      You want to print pieces.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Print_Out(1);
  VB: VBA: VB.net:
    Call B_Print_Out(1)

REMARK  The B_Print_Out function access data of all commands. This command has
    to be placed after all function and before B_ClosePrn().

******************************************************************************
B_Prn_Barcode()
==============================================================================
PURPOSE   Create a "barcode" object and a "counter" object.

SYNTAX
  VC:
    int B_Prn_Barcode(int x, int y, int ori, char type[4], int n, int w, int height,
      char human, LPCTSTR data);
  VB: VBA:
    Declare Function B_Prn_Barcode(ByVal x As Long, ByVal y As Long, ByVal ori As Long, _
      ByVal TType As String, ByVal narrow As Long, ByVal width As Long, _
      ByVal height As Long, ByVal human As Byte, ByVal data As String) As Long
  VB.net:
    Declare Function B_Prn_Barcode(ByVal x As Integer, ByVal y As Integer, _
      ByVal ori As Integer, ByVal TType As String, ByVal narrow As Integer, _
      ByVal width As Integer, ByVal height As Integer, ByVal human As Byte, _
      ByVal data As String) As Integer

PARAMETER
    x;
      X coordinate in dots.
    y;
      Y coordinate in dots.
    ori;
      Orientation or print direction. '0' is  0XA'1' is 90XB'2' is 180XA'3' is 270X
    type;
      Bar code type as follows:
      +========================================================================+
      | type|          Bar Code           | type|           Bar Code           |
      +========================================================================+
      |  0  | Code 128 UCC (shipping cont-|  E80| EAN-8                        |  
      |     | ainer code)                 +-----+------------------------------+
      +-----+-----------------------------+  E82| EAN-8 2 digit add-on         |
      |  1  | Code 128 subset A,B and C   +-----+------------------------------+
      +-----+-----------------------------+  E85| EAN-8 5 digit add-on         |
      |  1E | UCC/EAN                     +-----+------------------------------+
      +-----+-----------------------------+  K  | Codabar                      |
      |  2  | Interleaved 2 of 5          +-----+------------------------------+
      +-----+-----------------------------+  P  | Postnet                      |
      |  2C | Interleaved 2 of 5 with che-+-----+------------------------------+
      |     | ck sum digit                |  UA0| UPC-A                        |
      +-----+-----------------------------+-----+------------------------------+
      |  2D | Interleaved 2 of 5 with hum-|  UA2| UPC-A 2 digit add-on         |
      |     | an readable check digit     +-----+------------------------------+
      +-----+-----------------------------+  UA5| UPC-A 5 digit add-on         |
      |  2G | German Postcode             +-----+------------------------------+
      +-----+-----------------------------+  UE0| UPC-E                        |
      |  2M | Matrix 2 of 5               +-----+------------------------------+
      +-----+-----------------------------+  UE2| UPC-E 2 digit add-on         |
      |  2U | UPC Interleaved 2 of 5      +-----+------------------------------+
      +-----+-----------------------------+  UE5| UPC-E 5 digit add-on         |
      |  3  | Code 3 of 9                 +-----+------------------------------+
      +-----+-----------------------------+  R14|RSS-14                        |
      |  3C | Code 3 of 9 with check sum  +-----+------------------------------+
      |     | digit                       |  RL |RSS Limited                   |
      +-----+-----------------------------+-----+------------------------------+
      |  9  | Code 93                     |  RS |RSS Stacked                   | 
      +-----+-----------------------------+-----+------------------------------+
      |  E30| EAN-13                      |  RT |RSS Truncated                 |
      +-----+-----------------------------+-----+------------------------------+
      |  E32| EAN-13 2 digit add-on       |  RSO|RSS Stacked Omnidirectiona    |
      +-----+-----------------------------+-----+------------------------------+
      |  E35| EAN-13 5 digit add-on       |  REX|RSS Expanded                  |
      +-----+-----------------------------+-----+------------------------------+
    n;
      Narrow bar width in pixels.
      (In RSS codes, it's the pixel multiplier. Accepted Values:1-10, Default:1)
    w;
      Wide bar width in pixels.
      (In RSS codes, it's the amount of segments per row for RSS Expanded code 
      and ineffective for other RSS codes. Accepted Values:2-22(even only)  Default:22)
    height;
      Bar code height in pixels.
      The standard minimum height in RSS codes(default value):
      R14 -> 33 pixels
      RL  -> 10 pixels
      RS  -> 13 pixels
      RT  -> 13 pixels
      RSO -> 69 pixels
      REX -> 34 pixels
    human;
      N -no text is printed or B - the human readable text is printed.
    data;
      A text string. The data can be counter by adding the format <Operation Number>
      in the ending. Operation: "+" or "-" sign, Number: 0 ~ 32768 number.
      If RSS has need to add 2D(composite symbol) data, then it need to add '|' symbol, 
      example:1234567890123|123.
      Maximum numeric value in RSS codes:
      R14 -> 9999999999999
      RL  -> 1999999999999
      RS  -> 9999999999999
      RT  -> 9999999999999
      RSO -> 9999999999999
      REX -> 74 digits

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Prn_Barcode(650, 15, 0, "E80", 2, 2, 51, 'B', "1234567"); // no counter
      or
    B_Prn_Barcode(650, 15, 0, "E80", 2, 2, 51, 'B', "1234567<+10>");//have a counter
      or 
    B_Prn_Barcode(650, 15, 0, "R14", 2, 0, 33, 'B', "1234567890123|R14"); DataBar + CS
  VB: VBA: VB.net:
    Call B_Prn_Barcode(650, 15, 0, "E80", 2, 2, 51, Asc("B"), "1234567") 
      'no counter
      or
    Call B_Prn_Barcode(650, 15, 0, "E80", 2, 2, 51, Asc("B"), "1234567<+10>") 
      'have a counter
      or 
    Call B_Prn_Barcode(650, 15, 0, "R14", 2, 0, 33, Asc("B"), "1234567890123|R14") 
      'DataBar + CS

REMARK  The B_Prn_Barcode function can print a special Barcode and have a counter.

******************************************************************************
B_Prn_Configuration()
==============================================================================
PURPOSE   Configuration print out.

SYNTAX
  VC:
    void B_Prn_Configuration(void);
  VB: VBA: VB.net:
    Declare Sub B_Prn_Configuration()

EXAMPLE
  VC:
    B_Prn_Configuration();
  VB: VBA: VB.net:
    Call B_Prn_Configuration()

REMARK  The B_Prn_Configuration function will print out the printer
    configuration includeing settings, firmware version, accessories, etc...

******************************************************************************
B_Prn_Text()
==============================================================================
PURPOSE   Create a "text" object and a "counter" object.

SYNTAX
  VC:
    int B_Prn_Text(int x, int y, int ori, int font, int hor_factor, int ver_factor,
      char mode, LPCTSTR data);
  VB: VBA:
    Declare Function B_Prn_Text(ByVal x As Long, ByVal y As Long, ByVal ori As Long, _
      ByVal font As Long, ByVal hor_factor As Long, ByVal ver_factor As Long, _
      ByVal mode As Byte, ByVal data As String) As Long
  VB.net:
    Declare Function B_Prn_Text(ByVal x As Integer, ByVal y As Integer, _
      ByVal ori As Integer, ByVal font As Integer, ByVal hor_factor As Integer, _
      ByVal ver_factor As Integer, ByVal mode As Byte, ByVal data As String) As Integer

PARAMETER
    x;
      X coordinate in dots.
    y;
      Y coordinate in dots.
    ori;
      Orientation or print direction. '0' is  0XA'1' is 90XB'2' is 180XA'3' is 270X
    font;
      ID number for font selection. Value: 1 ~ 5 select resident font.
    hor_factor;
      Horizontal scale factor. Value: 1 ~ 24.
    ver_factor;
      Vertical scale factor. Value: 1 ~ 24.
    mode;
      N for normal text or R for reverse.
    data;
      A text string. When the data is added the format for <Operation Number> is 
      added counter. Operation: "+" or "-" sign, Number: 0 ~ 32768 number.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Prn_Text(50, 110, 0, 4, 1, 1, 'N', "A123456"); // no counter
        or
    B_Prn_Text(50, 110, 0, 4, 1, 1, 'N', "A123456<-1>"); // have a counter
  VB: VBA; VB.net:
    B_Prn_Text(50, 110, 0, 4, 1, 1, Asc("N"), "A123456") 'no counter
      or
    B_Prn_Text(50, 110, 0, 4, 1, 1, Asc("N"), "A123456<-1>") 'have a counter
    
REMARK  The B_Prn_Text function can print a line text and have a counter.

*******************************************************************************
B_Prn_Text_Chinese()
===============================================================================
PURPOSE   Create a "text" object with Chinese dot font file (16*15 or 24*24).

SYNTAX
  VC:
    int B_Prn_Text_Chinese(int x, int y, int fonttype, LPCTSTR id_name, LPCTSTR data);
  VB: VBA:
    Declare Function B_Prn_Text_Chinese(ByVal x As Long, ByVal y As Long, _
      ByVal fonttype As Long, ByVal id_name As String, ByVal data As String) As Long
  VB.net:
    Declare Function B_Prn_Text_Chinese(ByVal x As Integer, ByVal y As Integer, _
      ByVal fonttype As Integer, ByVal id_name As String, ByVal data As String) As Integer

PARAMETER
    x;
      X coordinates.(dot)
    y;
      Y coordinates.(dot)
    fonttype;
      Select Chinese dot font file. 0 -> 16*15B1 -> 24*24.
    id_name;
      To give a id name to store in printer after calling text by B_Load_Pcx().
    data;
      A text string.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Open_ChineseFont("C:\\ET3");
    B_Prn_Text_Chinese(100, 100, 0, "A01", "aQqeϢѢҢ");
  VB:
    Call B_Open_ChineseFont("C:\\ET3")
    Call B_Prn_Text_Chinese(100, 100, 0, "A01", "aQqeϢѢҢ")

REMARK  The B_Prn_Text_Chinese function is able to print a text for Chinese
    dot font file (16*15 or 24*24).

******************************************************************************
B_Prn_Text_TrueType()
B_Prn_Text_TrueType_W()
B_Prn_Text_TrueType_Uni()
B_Prn_Text_TrueType_UniB()
===============================================================================
PURPOSE   To print a line of text in TrueType font.

SYNTAX
  VC:
    int B_Prn_Text_TrueType(int x, int y, int FSize, LPCTSTR FType, int Fspin,
      int FWeight, int FItalic, int FUnline, int FStrikeOut, LPCTSTR id_name,
      LPCTSTR data);
    int B_Prn_Text_TrueType_W(int x, int y, int FHeight, int FWidth, LPCTSTR FType,
      int Fspin, int FWeight, int FItalic, int FUnline, int FStrikeOut, LPCTSTR id_name,
      LPCTSTR data);
    int B_Prn_Text_TrueType_Uni(int x, int y, int FSize, LPCTSTR FType, int Fspin,
      int FWeight, int FItalic, int FUnline, int FStrikeOut, LPCTSTR id_name, 
      LPCWSTR data, int format);
    int B_Prn_Text_TrueType_UniB(int x, int y, int FSize, LPCTSTR FType, int Fspin,
      int FWeight, int FItalic, int FUnline, int FStrikeOut, LPCTSTR id_name, 
      LPCTSTR data, int format);
  VB: VBA:
    Declare Function B_Prn_Text_TrueType(ByVal x As Long, ByVal y As Long, _
      ByVal FSize As Long, ByVal FType As String, ByVal Fspin As Long, _
      ByVal FWeight As Long, ByVal FItalic As Long, ByVal FUnline As Long, _
      ByVal FStrikeOut As Long, ByVal id_name As String, ByVal data As String) As Long
    Declare Function B_Prn_Text_TrueType_W(ByVal x As Long, ByVal y As Long, _
      ByVal FHeight As Long, ByVal FWidth As Long, ByVal FType As String, _
      ByVal Fspin As Long, ByVal FWeight As Long, ByVal FItalic As Long, _
      ByVal FUnline As Long, ByVal FStrikeOut As Long, ByVal id_name As String, _
      ByVal data As String) As Long
    Declare Function B_Prn_Text_TrueType_Uni(ByVal x As Long, ByVal y As Long, _
      ByVal FSize As Long, ByVal FType As String, ByVal Fspin As Long, _
      ByVal FWeight As Long, ByVal FItalic As Long, ByVal FUnline As Long, _
      ByVal FStrikeOut As Long, ByVal id_name As String, ByRef data As Byte, _
      ByVal format As Long) As Long
    Declare Function B_Prn_Text_TrueType_UniB(ByVal x As Long, ByVal y As Long, _
      ByVal FSize As Long, ByVal FType As String, ByVal Fspin As Long, _
      ByVal FWeight As Long, ByVal FItalic As Long, ByVal FUnline As Long, _
      ByVal FStrikeOut As Long, ByVal id_name As String, ByRef data As Byte, _
      ByVal format As Long) As Long
  VB.net:
    Declare Function B_Prn_Text_TrueType(ByVal x As Integer, ByVal y As Integer, _
      ByVal FSize As Integer, ByVal FType As String, ByVal Fspin As Integer, _
      ByVal FWeight As Integer, ByVal FItalic As Integer, ByVal FUnline As Integer, _
      ByVal FStrikeOut As Integer, ByVal id_name As String, _
      ByVal data As String) As Integer
    Declare Function B_Prn_Text_TrueType_W(ByVal x As Integer, ByVal y As Integer, _
      ByVal FHeight As Integer, ByVal FWidth As Integer, ByVal FType As String, _
      ByVal Fspin As Integer, ByVal FWeight As Integer, ByVal FItalic As Integer, _
      ByVal FUnline As Integer, ByVal FStrikeOut As Integer, ByVal id_name As String, _
      ByVal data As String) As Integer
    Declare Function B_Prn_Text_TrueType_Uni(ByVal x As Integer, ByVal y As Integer, _
      ByVal FSize As Integer, ByVal FType As String, ByVal Fspin As Integer, _
      ByVal FWeight As Integer, ByVal FItalic As Integer, ByVal FUnline As Integer, _
      ByVal FStrikeOut As Integer, ByVal id_name As String, ByVal data As Byte(), _
      ByVal format As Integer) As Integer
    Declare Function B_Prn_Text_TrueType_UniB(ByVal x As Integer, ByVal y As Integer, _
      ByVal FSize As Integer, ByVal FType As String, ByVal Fspin As Integer, _
      ByVal FWeight As Integer, ByVal FItalic As Integer, ByVal FUnline As Integer, _
      ByVal FStrikeOut As Integer, ByVal id_name As String, ByVal data As Byte(), _
      ByVal format As Integer) As Integer

PARAMETER
    x;
      X-coordinate; unit: pixel.
    y;
      Y-coordinate; unit: pixel.
    FSize;
      TrueType font size; unit: dot.
    FHeight;
      Font height; unit: dot.
    FWidth;
      Font width; unit: dot.
      FSize / FHeight / FWidth = (dpi * point) / 72.
    FType;
      Name of TrueType font.
    Fspin;
      TrueType font rotation. 1 -> 0, 2 -> 90, 3 -> 180, 4 -> 270
    FWeight;
      TrueType font thickness.
      0 and NULL is and  400 -> 400 Standard,
      100 -> Extra fine, 200 -> Very fine,
      300 -> Fine,       500 -> Normal,
      600 -> Half-bold,  700 -> Bold,
      800 -> Extra bold, 900 -> Boldface.
    FItalic;
      TrueType font set to Italic. 0 -> FALSE, 1 -> TRUE.
    FUnline;
      TrueType font set to underlined. 0 -> FALSE, 1 -> TRUE.
    FStrikeOut;
      TrueType font set to strikethrough. 0 -> FALSE, 1 -> TRUE.
    id_name;
      Provides a name to be stored in the printer for identification purposes; can 
      be call out graphic directly via the B_Load_Pcx() function.
    data;
      Text content. 
      For B_Prn_Text_TrueType_Uni() and B_Prn_Text_TrueType_UniB(), the encoding of 
      input data string should be in UTF-8, UTF-16, or in Unicode big endian format; 
      the string must be terminated with 0.
    format;
      Encoding scheme used to decode Unicode data.
      0 -> Determined by the BOM (byte order mark) in the string header.
      1 -> UTF-16.
      2 -> Unicode big endian.   
      3 -> UTF-8.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    char *pbuf = new char[128];
    B_Prn_Text_TrueType(30, 100, 30, "Arial", 1, 400, 0, 0, 0, "AA", "TrueType Font");
      //save in printer.
    B_Prn_Text_TrueType_W(30, 160, 20, 20, "Times New Roman", 1, 400, 0, 0, 0, "AB", 
      "TT_W: hr");
    B_Prn_Text_TrueType_Uni(30, 220, 30, "Times New Roman", 1, 400, 0, 0, 0, "AC",
      L"TT_Uni: hr",1);//UTF-16
    strcpy(pbuf, "\xFF\xFE");//UTF-16.
    memcpy(&pbuf[2], (char *)L"TT_UniB: hr", 15*2);//copy mutil byte.
    B_Prn_Text_TrueType_UniB(30, 280, 30, "Times New Roman", 1, 400, 0, 0, 0, "AD",
      pbuf, 0);//Byte Order Mark.
  VB:
    Dim buff1(128) As Byte
    Dim buff2() As Byte
    Dim i As Long
    Call B_Prn_Text_TrueType(30, 100, 30, "Arial", 1, 400, 0, 0, 0, "AA", _
      "TrueType Font") 'save in printer.
    Call B_Prn_Text_TrueType_W(30, 160, 20, 20, "Times New Roman", 1, 400, 0, 0, 0, _
      "AB", "TT_W: hr")
    buff2 = StrConv("TT_Uni: hr", vbNarrow) 
      'Converts UNICODE(wide characters) to single-byte characters.
    For i = LBound(buff2) To UBound(buff2)
        buff1(i) = buff2(i)
    Next i
    buff1(26) = 0 'null.
    buff1(27) = 0
    Call B_Prn_Text_TrueType_Uni(30, 220, 30, "Times New Roman", 1, 400, 0, 0, 0, _
      "AC", buff1(0), 1) 'UTF-16
    buff1(0) = 255 'UTF-16.
    buff1(1) = 254
    buff2 = StrConv("TT_UniB: hr", vbNarrow) 
      'Converts UNICODE(wide characters) to single-byte characters.
    For i = LBound(buff2) To UBound(buff2)
        buff1(i + 2) = buff2(i)
    Next i
    buff1(30) = 0 'null.
    buff1(31) = 0
    Call B_Prn_Text_TrueType_UniB(30, 280, 30, "Times New Roman", 1, 400, 0, 0, 0, _
      "AD", buff1(0), 0) 'Byte Order Mark.
  VB.net:
    Dim pbuf(128) As Byte
    Dim encUnicode = System.Text.Encoding.Unicode
    Call B_Prn_Text_TrueType(30, 100, 30, "Arial", 1, 400, 0, 0, 0, "AA", "TrueType Font") 
      'save in printer.
    Call B_Prn_Text_TrueType_W(30, 160, 20, 20, "Times New Roman", 1, 400, 0, 0, 0, _
      "AB", "TT_W: hr")
    Call B_Prn_Text_TrueType_Uni(30, 220, 30, "Times New Roman", 1, 400, 0, 0, 0, _
      "AC", encUnicode.GetBytes("TT_Uni: hr"), 1) 'UTF-16
    pbuf(0) = 255 'UTF-16.
    pbuf(1) = 254
    encUnicode.GetBytes("TT_UniB: hr", 0, 14, pbuf, 2) 'copy mutil byte.
    pbuf(30) = 0 'null.
    pbuf(31) = 0
    Call B_Prn_Text_TrueType_UniB(30, 280, 30, "Times New Roman", 1, 400, 0, 0, 0, _
      "AD", pbuf, 0) 'Byte Order Mark.

REMARK  The B_Prn_Text_TrueType function prints a line of text in TrueType font.

*******************************************************************************
B_Select_Option()
B_Select_Option2()
===============================================================================
PURPOSE   Setup print mode, enable Cutter or Peel.

SYNTAX
  VC:
    int B_Select_Option(int object);
    int B_Select_Option2(int object, int p);
  VB: VBA:
    Declare Function B_Select_Option(ByVal object As Long) As Long
    Declare Function B_Select_Option2(ByVal object As Long, ByVal p As Long) As Long
  VB.net:
    Declare Function B_Select_Option(ByVal object As Integer) As Integer
    Declare Function B_Select_Option2(ByVal object As Integer, _
      ByVal p As Integer) As Integer

PARAMETER
    object;
      Printer mode selection.
      1 -> thermal transfer, disable Cutter and Peel.
      2 -> direct thermal, disable Cutter and Peel.
      3 -> direct thermal, Cutter, disable Peel.
      4 -> direct thermal, Peel, disable Cutter.
      5 -> thermal transfer, Cutter, disable Peel.
      6 -> thermal transfer, Peel, disable Cutter.
    p;
      The number of label to print before cut.

RETREN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE:
  VC:
    B_Select_Option(1);
    B_Select_Option2(2, 3);
  VB: VBA: VB.net:
    Call B_Select_Option(1)
    Call B_Select_Option2(2, 3)

REMARK: The B_Select_Option(B_Select_Option2) function is to setup Printer
    print mode.

*******************************************************************************
B_Select_Symbol()
B_Select_Symbol2()
==============================================================================
PURPOSE   Select function - Symbol Set.

SYNTAX
  VC:
    int B_Select_Symbol(int num_bit, int symbol, int country);
    int B_Select_Symbol2(int num_bit, char csymbol[2], int country);
  VB: VBA:
    Declare Function B_Select_Symbol(ByVal num_bit As Long, ByVal symbol As Long, _
      ByVal country As Long) As Long
    Declare Function B_Select_Symbol2(ByVal num_bit As Long, ByVal csymbol As string, _
      ByVal country As Long) As Long
  VB.net:
    Declare Function B_Select_Symbol(ByVal num_bit As Integer, ByVal symbol As Integer, _
      ByVal country As Integer) As Integer
    Declare Function B_Select_Symbol2(ByVal num_bit As Integer, ByVal csymbol As string, _
      ByVal country As Integer) As Integer

PARAMETER
    num_bit;
      Data bit number.8 for 8-bit data and 7 for 7-bit data.
    symbol;
      Symbol set. NOTE:The factory default symbol set is Code page 437(English).
      +---------------------------+---------------------------+
      |       8 bit data          |       7 bit data          |
      +------+--------------------+------+--------------------+
      |symbol|    Code page       |symbol|     Code page      |
      +------+--------------------+------+--------------------+
      |  0   |English(437)        |  0   |USASCII             |
      +------+--------------------+------+--------------------+
      |  1   |Latin(850)          |  1   |British             |
      +------+--------------------+------+--------------------+
      |  2   |Slavic(852)         |  2   |German              |
      +------+--------------------+------+--------------------+
      |  3   |Portugal(860)       |  3   |French              |
      +------+--------------------+------+--------------------+
      |  4   |Canadian?French(863)|  4   |Danish              |
      +------+--------------------+------+--------------------+
      |  5   |Nordic(865)         |  5   |Italian             |
      +------+--------------------+------+--------------------+
      |      |                    |  6   |Spanish             |
      +------+--------------------+------+--------------------+
      |      |                    |  7   |Swedish             |
      +------+--------------------+------+--------------------+
      |      |                    |  8   |Swiss               |
      +------+--------------------+------+--------------------+
    csymbol;
      Symbol set. NOTE:The factory default symbol set is Code page 437(English).
      +---------------------------+---------------------------+
      |       8 bit data          |       7 bit data          |
      +------+--------------------+------+--------------------+
      |symbol|    Code page       |symbol|     Code page      |
      +------+--------------------+------+--------------------+
      |  0   |English(437)        |  0   |USASCII             |
      +------+--------------------+------+--------------------+
      |  1   |Latin(850)          |  1   |British             |
      +------+--------------------+------+--------------------+
      |  2   |Slavic(852)         |  2   |German              |
      +------+--------------------+------+--------------------+
      |  3   |Portugal(860)       |  3   |French              |
      +------+--------------------+------+--------------------+
      |  4   |Canadian/French(863)|  4   |Danish              |
      +------+--------------------+------+--------------------+
      |  5   |Nordic(865)         |  5   |Italian             |
      +------+--------------------+------+--------------------+
      |  6   |Turkish(857)        |  6   |Spanish             |
      +------+--------------------+------+--------------------+
      |  7   |Icelandic(861)      |  7   |Swedish             |
      +------+--------------------+------+--------------------+
      |  8   |Hebrew(862)         |  8   |Swiss               |
      +------+--------------------+------+--------------------+
      |  9   |Cyrillic(855)       |      |                    |
      +------+--------------------+------+--------------------+
      |  10  |Cyrillic CIS(866)   |      |                    |
      +------+--------------------+------+--------------------+
      |  11  |Greek(737)          |      |                    |
      +------+--------------------+------+--------------------+
      |  12  |Greek(851)          |      |                    |
      +------+--------------------+------+--------------------+
      |  13  |Greek(869)          |      |                    |
      +------+--------------------+------+--------------------+
      |  A   |Latin(1252)         |      |                    |
      +------+--------------------+------+--------------------+
      |  B   |Latin(1250)         |      |                    |
      +------+--------------------+------+--------------------+
      |  C   |Cyrillic(1251)      |      |                    |
      +------+--------------------+------+--------------------+
      |  D   |Greek(1253)         |      |                    |
      +------+--------------------+------+--------------------+
      |  E   |Turkish(1254)       |      |                    |
      +------+--------------------+------+--------------------+
      |  F   |Hebrew(1255)        |      |                    |
      +------+--------------------+------+--------------------+
    country;
      KDU country code.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Select_Symbol(7, 5, 1);
      or
    B_Select_Symbol2(7, "5", 1);
  VB: VBA: VB.net:
    Call B_Select_Symbol(7, 5, 1)
      or
    Call B_Select_Symbol2(7, "5", 1)

REMARK  The B_Select_Symbol function is used to select the proper symbol set.

******************************************************************************
B_Set_Backfeed()
==============================================================================
PURPOSE   Setup the "back feed" function.

SYNTAX
  VC:
    int B_Set_Backfeed(char option);
  VB: VBA:
    Declare Function B_Set_Backfeed(ByVal options As Byte) As Long
  VB.net:
    Declare Function B_Set_Backfeed(ByVal options As Byte) As Integer

PARAMETER
    option;
      B is disable back feed. F is the printer will feed about one more inch so that
      the user can see the whole label.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Backfeed('B');
  VB: VBA: VB.net:
    Call B_Set_Backfeed(Asc("B"))

REMARK  The B_Set_Backfeed() function enables the label to be fed a little bit
    ahead after printing which user could tear it off easily. And the label
    roll will be fed withdraw to proper position before the next label printed.

******************************************************************************
B_Set_Backfeed_Offset()
==============================================================================
PURPOSE   Set back feed offset(only for tear mode).

SYNTAX
  VC:
    int B_Set_Backfeed_Offset(int offset);
  VB: VBA:
    Declare Function B_Set_Backfeed_Offset(ByVal offset As Long) As Long
  VB.net:
    Declare Function B_Set_Backfeed_Offset(ByVal offset As Integer) As Integer

PARAMETER
    offset;
      back feed offset value, range: -127127 pixels.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Backfeed('F');
    B_Select_Option(2);
    B_Set_Backfeed_Offset(0);
  VB: VBA: VB.net:
    Call B_Set_Backfeed(Asc("F"))
    Call B_Select_Option(2)
    Call B_Set_Backfeed_Offset(0)

REMARK  The B_Set_Backfeed_Offset() function need to use firmware 2012/10/15 or later.

******************************************************************************
B_Set_CutPeel_Offset()
==============================================================================
PURPOSE   Set cut or peel offset(only for cut/peel mode).

SYNTAX
  VC:
    int B_Set_CutPeel_Offset(int offset);
  VB: VBA:
    Declare Function B_Set_CutPeel_Offset(ByVal offset As Long) As Long
  VB.net:
    Declare Function B_Set_CutPeel_Offset(ByVal offset As Integer) As Integer

PARAMETER
    offset;
      cut or peel offset value, range: -128127 pixels.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Select_Option(3);
    B_Set_CutPeel_Offset(0);
  VB: VBA: VB.net:
    Call B_Select_Option(3)
    Call B_Set_CutPeel_Offset(0)

*******************************************************************************
B_Set_BMPSave()
===============================================================================
PURPOSE   Save Image File.

SYNTAX
  VC:
    int B_Set_BMPSave(int nSave, char *pstrBMPFName);
  VB: VBA:
    Declare Function B_Set_BMPSave(ByVal nSave As Long, _
      ByVal pstrBMPFName As String) As Long
  VB.net:
    Declare Function B_Set_BMPSave(ByVal nSave As Integer, _
      ByVal pstrBMPFName As String) As Integer

PARAMETER
    nSave;
      1 -> Save Image.
      0 -> Don't Save Image.
    pstrBMPFName;
      File Name.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_BMPSave(1, "C:\\TempBMP.bmp");
  VB: VBA: VB.net:
    Call B_Set_BMPSave(1, "C:\\TempBMP.bmp")

REMARK  The B_Set_BMPSave function can decide to save image to file.

******************************************************************************
B_Set_Darkness()
==============================================================================
PURPOSE   Setup the "darkness" function (heating level).

SYNTAX
  VC:
    int B_Set_Darkness(int darkness);
  VB: VBA:
    Declare Function B_Set_Darkness(ByVal darkness As Long) As Long
  VB.net:
    Declare Function B_Set_Darkness(ByVal darkness As Integer) As Integer

PARAMETER
    darkness;
      Acceptable values from 0 to 15.The default darkness value is 8.
RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Darkness(9);
  VB: VBA: VB.net:
    Call B_Set_Darkness(9)

REMARK  The B_Set_Darkness function will define the printers darkness.
    Different media material, print-out pattern and printing speed will
    cause different printout darkness; and which can be adjusted by this function.

*******************************************************************************
B_Set_DebugDialog()
===============================================================================
PURPOSE   Enable Debug Message Dialog.

SYNTAX
  VC:
    int B_Set_DebugDialog(int nEnable);
  VB: VBA:
    Declare Function B_Set_DebugDialog(ByVal nEnable As Long) As Long
  VB.net:
    Declare Function B_Set_DebugDialog(ByVal nEnable As Integer) As Integer

PARAMETER
    nEnable;
      1 -> Enable.
      0 -> Disable.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_DebugDialog(1);
  VB: VBA: VB.net:
    Call B_Set_DebugDialog(1)

REMARK  The B_Set_DebugDialog function set debug message dialog.

******************************************************************************
B_Set_Direction()
==============================================================================
PURPOSE   Setup "Print Direction".

SYNTAX
  VC:
    int B_Set_Direction(char direction);
  VB: VBA:
    Declare Function B_Set_Direction(ByVal direction As Byte) As Long
  VB.net:
    Declare Function B_Set_Direction(ByVal direction As Byte) As Integer

PARAMETER
    direction;
      Acceptable values are B or T.They are diagonally symmetrical.
      The default value is T.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Direction('T');
  VB: VBA: VB.net:
    Call B_Set_Direction(Asc("T"))

REMARK  The B_Set_Direction function will setup the print direction for all
    graphics,texts,bar codes,lines and boxes.

******************************************************************************
B_Set_Form()
==============================================================================
PURPOSE   Download a form from PC into printers RAM or Flash memory.

SYNTAX
  VC:
    int B_Set_Form(LPCTSTR formfile);
  VB: VBA:
    Declare Function B_Set_Form(ByVal formfile As String) As Long
  VB.net:
    Declare Function B_Set_Form(ByVal formfile As String) As Integer

PARAMETER
    formfile;
      File name for form.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Form("demo.prn");
  VB: VBA: VB.net:
    Call B_Set_form("demo.prn")

REMARK  The B_Set_Form function activates a form store sequence to be printed.
    The function is used befor B_Print_Form().

******************************************************************************
B_Set_Labgap()
==============================================================================
PURPOSE   Setup the "Label and Gap Length".

SYNTAX
  VC:
    int B_Set_Labgap(int lablength, int gaplength);
  VB: VBA:
    Declare Function B_Set_Labgap(ByVal lablength As Long, _
      ByVal gaplength As Long) As Long
  VB.net:
    Declare Function B_Set_Labgap(ByVal lablength As Integer, _
      ByVal gaplength As Integer) As Integer

PARAMETER
    lablength;
      Form length after the last image line. Unit is dot.
    gaplength;
      Gap length.For continuous media(without gap)this field should be set to 0.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Labgap(100, 20);
  VB: VBA; VB.net:
    Call B_Set_Labgap(100, 20)
    
REMARK  The B_Set_Labgap function set label length and GAP length.

******************************************************************************
B_Set_Labwidth()
==============================================================================
PURPOSE   Setup the "Label Width".

SYNTAX
  VC:
    int B_Set_Labwidth(int labwidth);
  VB: VBA:
    Declare Function B_Set_Labwidth(ByVal labwidth As Long) As Long
  VB.net:
    Declare Function B_Set_Labwidth(ByVal labwidth As Integer) As Integer

PARAMETER
    labwidth;
      Label width in dots.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Labwidth(250);
  VB: VBA: VB.net:
    Call B_Set_Labwidth(250)

REMARK  The B_Set_Labwidth function will set the label width. This is an
    alternative to sending a B_Set_Originpoint function for centering labels.

******************************************************************************
B_Set_Originpoint()
==============================================================================
PURPOSE   Setup the "Origin point".

SYNTAX
  VC:
    int B_Set_Originpoint(int hor, int ver);
  VB: VBA:
    Declare Function B_Set_Originpoint(ByVal hor As Long, ByVal ver As Long) As Long
  VB.net:
    Declare Function B_Set_Originpoint(ByVal hor As Integer, _
      ByVal ver As Integer) As Integer

PARAMETER
    hor;
      Horizontal margin measured in dots.
    ver;
      Vertical margin measured in dots.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Originpoint(0,0);
  VB: VBA: VB.net:
    Call B_Set_Originpoint(0,0)

REMARK  The B_Set_Originpoint function will move the origin point for the X
    and Y axes. After sending this function, all coordinates will be
    moved according to the new orgin.

******************************************************************************
B_Set_Prncomport()
==============================================================================
PURPOSE   Setup the "Serial Port".

SYNTAX
  VC:
    int B_Set_Prncomport(int baud, char parity, int data, int stop);
  VB: VBA:
    Declare Function B_Set_Prncomport(ByVal baud As Long, ByVal parity As Byte, _
      ByVal data As Long, ByVal stopp As Long) As Long
  VB.net:
    Declare Function B_Set_Prncomport(ByVal baud As Integer, ByVal parity As Byte, _
      ByVal data As Integer, ByVal stopp As Integer) As Integer

PARAMETER
    baud;
      Baud rate. Acceptable values are:
      38 -> 38400
      19 -> 19200
      96 -> 9600
      48 -> 4800
      24 -> 2400
      57 -> 57600
      11 -> 115200
    parity;
      Parity. O -odd, E -even parity and N -none parity.
    data;
      Data bit number,7 or 8.
    stop;
      Stop bit number,1 or 2.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Prncomport(96, 'N', 8, 1);
  VB: VBA: VB.net:
    Call B_Set_Prncomport(96, Asc("N"), 8, 1)

REMARK  The B_Set_Prncomport function will setup the serial port parameters as
    to match your hosts configuration. The protocol between host and
    printer must be in identical condition.

*******************************************************************************
B_Set_Prncomport_PC()
===============================================================================
PURPOSE   Setup the serial port for PC.

SYNTAX
  VC:
    int B_Set_Prncomport_PC(int nBaudRate, int nByteSize, int nParity, int nStopBits,
      int nDsr, int nCts, int nXonXoff);
  VB: VBA:
    Declare Function B_Set_Prncomport_PC(ByVal nBaudRate As Long, _
      ByVal nByteSize As Long, ByVal nParity As Long, ByVal nStopBits As Long, _
      ByVal nDsr As Long, ByVal nCts As Long, ByVal nXonXoff As Long) As Long
  VB.net:
    Declare Function B_Set_Prncomport_PC(ByVal nBaudRate As Integer, _
      ByVal nByteSize As Integer, ByVal nParity As Integer, ByVal nStopBits As Integer, _
      ByVal nDsr As Integer, ByVal nCts As Integer, ByVal nXonXoff As Integer) As Integer

PARAMETER
    nBaudRate;
      Baud rate:
      1 -> 110     9 -> 19200
      2 -> 300    10 -> 38400
      3 -> 600    11 -> 56000
      4 -> 1200   12 -> 57600
      5 -> 2400   13 -> 115200
      6 -> 4800   14 -> 128000
      7 -> 9600   15 -> 256000
      8 -> 14400   0 -> 9600
    nByteSize;
      Data bit number:
      0 -> 7-bit data
      7 -> 7-bit data
      8 -> 8-bit data
    nParity;
      Parity:
      0 -> none parity
      1 -> even parity
      2 -> odd  parity
    nStopBits;
      Stop bit number:
      0 -> 1 stop bit
      1 -> 1 stop bit
      2 -> 2 stop bits
    nDsr;
      Setup hardware flow control
      1 -> DTR CONTROL HANDSHAKE;
      0 -> DTR CONTROL ENABLE;
    nCts;
      Setup hardware flow control
      1 -> RTS CONTROL HANDSHAKE;
      0 -> RTS CONTROL ENABLE;
    nXonXoff;
      Setup software flow control
      0 -> Enable;
      1 -> Disable;

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Prncomport_PC(0, 0, 0, 0, 0, 0, 0);
  VB: VBA: VB.net:
    Call B_Set_Prncomport_PC(0, 0, 0, 0, 0, 0, 0)

REMARK  The fuction of B_Set_Prncomport_PC is to setup the value of PC serial
    Port. For successful communication between PC and Printer, this value
    should be commanded in accrodance with the setting value of printer.
    Besides, this command should be set before B_Print_Out() executed.

******************************************************************************
B_Set_Speed()
==============================================================================
PURPOSE   Setup the "print speed".

SYNTAX
  VC:
    int B_Set_Speed(int speed);
  VB: VBA:
    Declare Function B_Set_Speed(ByVal speed As Long) As Long
  VB.net:
    Declare Function B_Set_Speed(ByVal speed As Integer) As Integer

PARAMETER
    speed;
      A single char acter(0 to 7) representing a particular speed setting.
      The range depends on your printer model.
      +-------------+------------------+
      | speed Value | SPEED            |
      +-------------+------------------+
      | 0 or 1      | 1 ips (25 mmps)  |
      +-------------+------------------+
      |   2         | 2 ips (50 mmps)  |
      +-------------+------------------+
      |   3         | 3 ips (75 mmps)  |
      +-------------+------------------+
      |   4         | 4 ips (100 mmps) |
      +-------------+------------------+
      |   5         | 5 ips (125 mmps) |
      +-------------+------------------+
      |   6         | 6 ips (150 mmps) |
      +-------------+------------------+
      |   7         | 7 ips (175 mmps) |
      +-------------+------------------+

RETURN  0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_Speed(2);
  VB: VBA: VB.net:
    Call B_Set_Speed(2)

REMARK  The B_Set_Speed function will set a particular speed for the label or
    batch of labels being printed.

******************************************************************************
B_Set_ProcessDlg()
==============================================================================
PURPOSE   Enable or disable printing task transmission process bar.

SYNTAX
  VC:
    int B_Set_ProcessDlg(int nShow);
  VB: VBA:
    Declare Function B_Set_ProcessDlg(ByVal nShow As Long) As Long
  VB.net:
    Declare Function B_Set_ProcessDlg(ByVal nShow As Integer) As Integer

PARAMETER
    nShow;
      0 -> disable.
      1 -> enable.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_ProcessDlg(1);
  VB: VBA: VB.net:
    Call B_Set_ProcessDlg(1)

REMARK  The B_Set_ProcessDlg function is used to disable or enable the Process
    bar Dialog.

******************************************************************************
B_Set_ErrorDlg()
==============================================================================
PURPOSE   Enable or disable retry inquiry dialog when transmitting fail.

SYNTAX
  VC:
    int B_Set_ErrorDlg(int nShow);
  VB: VBA:
    Declare Function B_Set_ErrorDlg(ByVal nShow As Long) As Long
  VB.net:
    Declare Function B_Set_ErrorDlg(ByVal nShow As Integer) As Integer

PARAMETER
    nShow;
      0 -> disable.
      1 -> enable.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_ErrorDlg(1);
  VB: VBA: VB.net:
    Call B_Set_ErrorDlg(1)

REMARK  The B_Set_ErrorDlg function is used to disable or enable retry inquiry 
    dialog when transmitting fail.

*******************************************************************************
B_Bar2d_PDF417_N()
===============================================================================
PURPOSE   Create the 2D barcode object - PDF-417.

SYNTAX
  VC:
    int B_Bar2d_PDF417_N(int x, int y, int w, int h, LPCTSTR pParameter, LPCTSTR data);
  VB: VBA:
    Declare Function B_Bar2d_PDF417_N Lib(ByVal x As Long, ByVal y As Long, _
      ByVal w As Long, ByVal h As Long, ByVal pParameter As String, _
      ByVal data As String) As Long
  VB.net:
    Declare Function B_Bar2d_PDF417_N Lib(ByVal x As Integer, ByVal y As Integer, _
      ByVal w As Integer, ByVal h As Integer, ByVal pParameter As String, _
      ByVal data As String) As Integer

PARAMETER
    x;
      X coordinate in dots.
    y;
      Y coordinate in dots.
    w;
      Maximum print width in dots.
    h;
      Maximum print height in dots.
    pParameter;
      Other parameter that can to hide, so can use NULL.
      Error correction level(s), 0 ~ 8.
      Data compression level(c), 0 or 1 .
      print human readble(pxxx,yyy,mm)
      xxx:Human readable horizontal start location, 0 ~ 999.
      yyy:Human readable vertical start location, 0 ~ 999.
      mm:Maximum characters per line, 0 ~ 99.
      Bar code origin point(f). 0=Upper left corner of barcode; 1=Center of barcode (default).
      Module width(x), 2 ~ 9 in dots.
      Module height(y), 4 ~ 99 in dots.
      Maximum row count(r).
      Maximum column count(l).
      Truncation flag(t), 0 = normal,1 = truncated.
      Rotation(o), '0' is  0XA'1' is 90XB'2' is 180XA'3' is 270X
    data;
      A data string.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Bar2d_PDF417_N(10, 10, 400, 300, "s0,c0,p400,400,10,f0,x3,y7,r10,l2,f0",
      "ARGOXINFO");
  VB: VBA: VB.net:
    Call B_Bar2d_PDF417_N(10, 10, 400, 300, "s0,c0,p400,400,10,f0,x3,y7,r10,l2,f0", _
      "ARGOXINFO");
    To ignore the whole pParameter or even part of the sub-parameters of
    pParameter is accepted.
    1. To ignore the whole pParameter: Simply issue the value as "NULL".
    2. To ignore part of the sub-parameters of pParameter, please notice
      the sub-parameters that controls "print human readable"
      (pxxx,yyy,mm) should be ignored as a sub-parameter set.
    For example, you can ignore s0, c0, f0, x3, y7, r10, l2, or f0
    individually, but you should ignore the p400, 400, 10 together.
    s0,c0,p400,400,10,f0,x3,y7,r10,l2,f0

REMARK  The B_Bar2d_PDF417_N function will print a PDF-417 code.

*******************************************************************************
B_ResetPrinter()
===============================================================================
PURPOSE   This function emulates Power Off and then Power On.

SYNTAX
  VC:
    int B_ResetPrinter();
  VB: VBA:
    Declare Function B_ResetPrinter() As Long
  VB.net:
    Declare Function B_ResetPrinter() As Integer

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_ResetPrinter();
  VB: VBA: VB.net:
    Call B_ResetPrinter()

*******************************************************************************
B_GetPrinterResponse()
===============================================================================
PURPOSE   This function receive the printer error code from comport.

SYNTAX
  VC:
    int B_GetPrinterResponse(char *pbuf, int nMax);
  VB: VBA:
    Declare Function B_GetPrinterResponse(ByVal pbuf As String, _
      ByVal nMax As Long) As Long
  VB.net:
    Declare Function B_GetPrinterResponse(ByVal pbuf As Byte(), _
      ByVal nMax As Integer) As Integer

RETURN
    the data length get from printer.

EXAMPLE
  VC:
    char *pbuf, temp[3];
    int nMax = 100;
    pbuf = (char *)new char[nMax];
    B_GetPrinterResponse(pbuf, nMax);

    if(pbuf[0] == '\x15'){
      memcpy(temp, pbuf + 1, 2);
      nError = atoi(temp);
      if(nError == 1)
        AfxMessageBox("Command phrase error");
      else if(nError == 3)
        AfxMessageBox("Data error for barcode");
      else if(nError == 4)
        AfxMessageBox("Memory full");
      else if(nError == 7)
        AfxMessageBox("Media or ribbon out");
      else{
        strTemp.Format("%d", pbuf[1]);
        AfxMessageBox(strTemp);
      }
    }
  VB: VBA:
    Dim pbuf As String
    pbuf = String$(100, vbNullChar)
    Call B_GetPrinterResponse(pbuf,100)

    If Mid(pbuf,1,1) = Chr(&H15) Then
      If Mid(pbuf,2,2) = "01" Then
        MsgBox "Command phrase error"  
      ElseIf Mid(pbuf,2,2) = "03" Then
        MsgBox "Data error for barcode"
      ElseIf Mid(pbuf,2,2) = "04" Then
        MsgBox "Memory full"
      ElseIf Mid(pbuf,2,2) = "07" Then
        MsgBox "Media or ribbon out"
      Else
        MsgBox "Error Code=" & Mid(pbuf,2,2)
      End If
    End If

REMARK  You must enable the printer error reporting first by call the fucntion
    B_Error_Reporting('S') or you will got nothing.

*******************************************************************************
B_TFeedMode()
===============================================================================
PURPOSE   Set printer to T-Feed mode.

SYNTAX
  VC:
    int B_TFeedMode(int nMode);
  VB: VBA:
    Declare Function B_TFeedMode(ByVal nMode As Long) As Long
  VB.net:
    Declare Function B_TFeedMode(ByVal nMode As Integer) As Integer

PARAMETER
    nMode;
      0 -> Normal.
      1 -> T Feed Mode.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_TFeedMode(0);
  VB: VBA: VB.net:
    Call B_TFeedMode(0)

REMARK  This function is only applied to the X-1000+ with the firmware version
    "X1B0-2.40C" and "X1B0-2.41C".

*******************************************************************************
B_TFeedTest()
===============================================================================
PURPOSE   Paper/Ribbon test in T-Feed mode.

SYNTAX
  VC:
    int B_TFeedTest(void);
  VB: VBA:
    Declare Function B_TFeedTest() As Long
  VB.net:
    Declare Function B_TFeedTest() As Integer

RETURN
    0 --> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_TFeedTest();
  VB: VBA: VB.net:
    Call B_TFeedTest()

REMARK  This function is only applied to the X-1000+ with the firmware version
    "X1B0-2.40C" and "X1B0-2.41C".

*******************************************************************************
B_Execute_Form()
===============================================================================
PURPOSE   Execute a form stored in printer.

SYNTAX
  VC:
    int B_Execute_Form(char form_out[10],LPTSTR var);
  VB: VBA:
    Declare Function B_Execute_Form(ByVal form_out As String, _
      ByVal var As String) As Long
  VB.net:
    Declare Function B_Execute_Form(ByVal form_out As String, _
      ByVal var As String) As Integer

PARAMETER
    form_out;
      Form name of store in printer. The name is same inter form name of printer.
    var;
      VAR,COUNT in accordance with forms. Use "," to differentiate between VAR or COUNT 
      of string.You would want to use ",". You can use ";,".This ";," is "," mean.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Execute_Form("demo", "2000,Bicycle");
  VB: VBA: VB.net:
    Call B_Execute_Form("demo", "2000,Bicycle")

*******************************************************************************
B_Bar2d_QR()
===============================================================================
PURPOSE   Create the 2D barcode object - QR code.

SYNTAX
  VC:
    int B_Bar2d_QR(int x, int y, int model, int scl, char error, char dinput, int c,
      int d, int p, LPCTSTR data);
  VB: VBA:
    Declare Function B_Bar2d_QR(ByVal x As Long, ByVal y As Long, ByVal model As Long, _
      ByVal scl As Long, ByVal err As Byte, ByVal dinput As Byte, ByVal c As Long, _
      ByVal d As Long, ByVal p As Long, ByVal data As String) As Long
  VB.net:
    Declare Function B_Bar2d_QR(ByVal x As Integer, ByVal y As Integer, _
      ByVal model As Integer, ByVal scl As Integer, ByVal err As Byte, _
      ByVal dinput As Byte, ByVal c As Integer, ByVal d As Integer, ByVal p As Integer, _
      ByVal data As String) As Integer

PARAMETER
    x;
      X coordinate in dots.
    y;
      Y coordinate in dots.
    model;
      Code model. Values: 1,2 (Printer will take default value 2 for other setting)
    scl;
      Barcode scale. Values: 1~99 (Printer will take default value 3 for other setting)                 
    error;
      Error correction level.
      L = Lower error correction, most data
      M = Default
      Q = Optimized for error correction over data
      H = Highest error correction, latest data
      (Printer will take default value M for other setting)
    dinput;
      Data input mode.
      A = Automatic mode 
      M = Manual mode
      (Printer will take default value A for other setting)
    c,d,p;
      Append symbol.(Outranged value will disable this item)
      +-------------+-------+-------+
      | Description |Varible| Range |
      +-------------+-------+-------+
      |Symbol Number|   c   | 1~16  |
      +-------------+-------+-------+
      |  Divisions  |   d   | 1~16  |
      +-------------+-------+-------+
      |   Parity    |   p   | 0~255 |
      +-------------+-------+-------+                    
    data;
      Data string.
      If the value of dinput is 'M'(Manual mode), the initial of data string
      must be the following value. 
      N = Numeric data 
      A = Alphanumeric data
      Bxxxx = For 8-bit byte mode. "xxxx" indicates the number of characters. 
              (A Simple or Traditional Chinese word is 2 characters)
      K=Kanji data

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Bar2d_QR(100, 100, 1, 3, 'M', 'A', 0, 0, 0, "N123456789");
  VB: VBA: VB.net:
    Call B_Bar2d_QR(100, 100, 1, 3, Asc("M"), Asc("A"), 0, 0, 0, "N123456789")

REMARK  The B_Bar2d_QR() function is used to print QR code.

*******************************************************************************
B_Set_EncryptionKey()
===============================================================================
Function: Set the encryption key.

Syntax:
  VC:
    int B_Set_EncryptionKey(char encryptionKey[16]);
  VB: VBA:
    Declare Function B_Set_EncryptionKey(ByVal encryptionKey As String) As Long
  VB.net:
    Declare Function B_Set_EncryptionKey(ByVal encryptionKey As String) As Integer

Parameters:
    encryptionKey;
      The encryption key, the key needs 16 chars and the range from 0x21 to 0x7E.

RETURN:
    0 -> OK.
    Reference BW-Error.txt file.

Example:
  VC:
    B_Set_EncryptionKey("key-123456789000");
  VB: VBA: VB.net:
    Call B_Set_EncryptionKey("key-123456789000")

REMARK  This function is used to set the encryption key value, and send data immediate, 
    and store in printer.

*******************************************************************************
B_Check_EncryptionKey()
===============================================================================
FunctionG  Check the encryption key correctness.

SyntaxG
  VC:
    int B_Check_EncryptionKey(char decodeKey[8], char encryptionKey[16], DWORD dwTimeoutms);
  VB: VBA:
    Declare Function B_Check_EncryptionKey(ByVal decodeKey As String, ByVal encryptionKey As String, _
      ByVal dwTimeoutms As Long) As Long
  VB.net:
    Declare Function B_Check_EncryptionKey(ByVal decodeKey As String, ByVal encryptionKey As String, _
      ByVal dwTimeoutms As ULong) As Integer

ParametersG
    decodeKey;
      The decode key, the key needs 8 chars and the range from 0x21 to 0x7E.
    encryptionKey;
      The encryption key, the key needs 16 chars and the range from 0x21 to 0x7E.
    dwTimeoutms;
      This is timeout time. The max times to receive data, unit is ms.

RETURNG
    0 -> OK.
    Reference BW-Error.txt file.

ExampleG
  VC:
    int ret;
    ret = B_Check_EncryptionKey("test-par", "key-123456789000", 1000);//1 second.
  VB: VBA:
    Dim ret As Long
    ret = B_Check_EncryptionKey("test-par", "key-123456789000", 1000)   '1 second.
  VB.net:
    Dim ret As Integer
    ret = B_Check_EncryptionKey("test-par", "key-123456789000", 1000)   '1 second.

REMARK  This function is used to check the encryption key correctness. After send 
    the decodeKey string to printer, and calculate with the encryption key in printer 
    then return the result. Then to compare with that calculate with the decodeKey and 
    encryptionKey string is the same.

*******************************************************************************
B_Set_CommTimeout()
===============================================================================
PURPOSE   Set communication time.

SYNTAX
  VC:
    void B_Set_CommTimeout(int ReadTotalTimeoutConstant, int WriteTotalTimeoutConstant);
  VB: VBA:
    Declare Sub B_Set_CommTimeout(ByVal ReadTotalTimeoutConstant As Long, _
      ByVal WriteTotalTimeoutConstant As Long)
  VB.net:
    Declare Sub B_Set_CommTimeout(ByVal ReadTotalTimeoutConstant As Integer, _
      ByVal WriteTotalTimeoutConstant As Integer)

PARAMETER
    ReadTotalTimeoutConstant;
      read timeout; unit : 1 ms. -1 is infinite.
    WriteTotalTimeoutConstant;
      write timeout; unit : 1 ms. -1 is infinite.

EXAMPLE
  VC:
    B_Set_CommTimeout(0, -1);
    B_CreatePrn(11, NULL); //USB
  VB: VBA: VB.net:
    Call B_Set_CommTimeout(0, -1)
    Call B_CreatePrn(11, null) 'USB

REMARK  The fuction of B_Set_CommTimeout is to setting read/write timeout. 
    If you want to use this command, this command should be set before B_CreatePrn() executed.

*******************************************************************************
B_Get_CommTimeout()
===============================================================================
PURPOSE   Get communication time.

SYNTAX
  VC:
    void B_Get_CommTimeout(int *ReadTotalTimeoutConstant, int *WriteTotalTimeoutConstant);
  VB: VBA:
    Declare Sub B_Get_CommTimeout(ByRef ReadTotalTimeoutConstant As Long, _
      ByRef WriteTotalTimeoutConstant As Long)
  VB.net:
    Declare Sub B_Get_CommTimeout(ByRef ReadTotalTimeoutConstant As Integer, _
      ByRef WriteTotalTimeoutConstant As Integer)

PARAMETER
    ReadTotalTimeoutConstant;
      read timeout; unit : 1 ms. -1 is infinite.
    WriteTotalTimeoutConstant;
      write timeout; unit : 1 ms. -1 is infinite.

EXAMPLE
  VC:
    int ReadTotalTimeoutConstant, WriteTotalTimeoutConstant;
    B_Get_CommTimeout(&ReadTotalTimeoutConstant, &WriteTotalTimeoutConstant);
  VB: VBA: VB.net:
    Dim ReadTotalTimeoutConstant, WriteTotalTimeoutConstant As Long
    Call B_Get_CommTimeout(ReadTotalTimeoutConstant, WriteTotalTimeoutConstant)

*******************************************************************************
B_Set_LabelForSmartPrint()
===============================================================================
PURPOSE   Set the information needed for Smart Print.

SYNTAX
  VC:
    int B_Set_LabelForSmartPrint(int lablength, int gaplength);
  VB: VBA:
    Declare Function B_Set_LabelForSmartPrint(ByVal lablength As Long, _
      ByVal gaplength As Long) As Long
  VB.net:
    Declare Function B_Set_LabelForSmartPrint(ByVal lablength As Integer, _
      ByVal gaplength As Integer) As Integer
      
PARAMETER
    lablength;
      Label length. Unit : 0.1 mm.
    gaplength;
      Gap length. Unit : 0.1 mm.

RETURN
    0 -> OK.
    Reference BW-Error.txt file.

EXAMPLE
  VC:
    B_Set_LabelForSmartPrint(762, 30);
  VB: VBA: VB.net:
    Call B_Set_LabelForSmartPrint(762, 30)

REMARK  This B_Set_LabelForSmartPrint function is used to set 
    the label length and GAP length information required for Smart Print.